diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-07-10 09:21:39 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-07-10 09:21:39 +0000 |
commit | b4d3e8e2a56d2455f589c52d865f09b430eeae37 (patch) | |
tree | b8e6d056111cf62be1680f8c170c7efaa491da69 | |
parent | 423d02ce2bd846fe4807f72f53ea897ffe7d1315 (diff) | |
download | ATCD-b4d3e8e2a56d2455f589c52d865f09b430eeae37.tar.gz |
Fri Jul 10 09:20:57 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/Time_Value.{h,cpp,inl}:
Removed workarounds for old eVC, the extern causes major
problems when trying to compile ACE in release mode for a
Windows CE x86 target
-rw-r--r-- | ACE/ChangeLog | 7 | ||||
-rw-r--r-- | ACE/ace/Time_Value.cpp | 47 | ||||
-rw-r--r-- | ACE/ace/Time_Value.h | 19 | ||||
-rw-r--r-- | ACE/ace/Time_Value.inl | 81 |
4 files changed, 54 insertions, 100 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index e8949d40767..eeafe4a0efc 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,10 @@ +Fri Jul 10 09:20:57 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl> + + * ace/Time_Value.{h,cpp,inl}: + Removed workarounds for old eVC, the extern causes major + problems when trying to compile ACE in release mode for a + Windows CE x86 target + Thu Jul 9 11:54:57 UTC 2009 Olli Savia <ops@iki.fi> * ace/Monitor_Control/BSD_Network_Interface_Monitor.cpp: diff --git a/ACE/ace/Time_Value.cpp b/ACE/ace/Time_Value.cpp index 33ebdd8fa7f..4f6953be055 100644 --- a/ACE/ace/Time_Value.cpp +++ b/ACE/ace/Time_Value.cpp @@ -4,7 +4,6 @@ ACE_RCSID (ace, Time_Value, "$Id$") - #if !defined (__ACE_INLINE__) #include "ace/Time_Value.inl" #endif /* __ACE_INLINE__ */ @@ -14,25 +13,24 @@ ACE_RCSID (ace, ACE_BEGIN_VERSIONED_NAMESPACE_DECL -// Static constant representing `zero-time'. -// Note: this object requires static construction. +/// Static constant representing `zero-time'. +/// Note: this object requires static construction. const ACE_Time_Value ACE_Time_Value::zero; -// Constant for maximum time representable. Note that this time -// is not intended for use with select () or other calls that may -// have *their own* implementation-specific maximum time representations. -// Its primary use is in time computations such as those used by the -// dynamic subpriority strategies in the ACE_Dynamic_Message_Queue class. -// Note: this object requires static construction. +/// Constant for maximum time representable. Note that this time +/// is not intended for use with select () or other calls that may +/// have *their own* implementation-specific maximum time representations. +/// Its primary use is in time computations such as those used by the +/// dynamic subpriority strategies in the ACE_Dynamic_Message_Queue class. +/// Note: this object requires static construction. const ACE_Time_Value ACE_Time_Value::max_time ( ACE_Numeric_Limits<time_t>::max (), ACE_ONE_SECOND_IN_USECS - 1); ACE_ALLOC_HOOK_DEFINE (ACE_Time_Value) -// Increment microseconds (the only reason this is here is to allow -// the use of ACE_Atomic_Op with ACE_Time_Value). - +/// Increment microseconds (the only reason this is here is to allow +/// the use of ACE_Atomic_Op with ACE_Time_Value). ACE_Time_Value ACE_Time_Value::operator ++ (int) { @@ -51,9 +49,8 @@ ACE_Time_Value::operator ++ (void) return *this; } -// Decrement microseconds (the only reason this is here is / to allow -// the use of ACE_Atomic_Op with ACE_Time_Value). - +/// Decrement microseconds (the only reason this is here is / to allow +/// the use of ACE_Atomic_Op with ACE_Time_Value). ACE_Time_Value ACE_Time_Value::operator -- (int) { @@ -73,13 +70,13 @@ ACE_Time_Value::operator -- (void) } #if defined (ACE_WIN32) -// Static constant to remove time skew between FILETIME and POSIX -// time. POSIX and Win32 use different epochs (Jan. 1, 1970 v.s. -// Jan. 1, 1601). The following constant defines the difference -// in 100ns ticks. -// -// In the beginning (Jan. 1, 1601), there was no time and no computer. -// And Bill said: "Let there be time," and there was time.... +/// Static constant to remove time skew between FILETIME and POSIX +/// time. POSIX and Win32 use different epochs (Jan. 1, 1970 v.s. +/// Jan. 1, 1601). The following constant defines the difference +/// in 100ns ticks. +/// +/// In the beginning (Jan. 1, 1601), there was no time and no computer. +/// And Bill said: "Let there be time," and there was time.... # if defined (ACE_LACKS_LONGLONG_T) const ACE_U_LongLong ACE_Time_Value::FILETIME_to_timval_skew = ACE_U_LongLong (0xd53e8000, 0x19db1de); @@ -88,8 +85,7 @@ const DWORDLONG ACE_Time_Value::FILETIME_to_timval_skew = ACE_INT64_LITERAL (0x19db1ded53e8000); # endif -// Initializes the ACE_Time_Value object from a Win32 FILETIME - +/// Initializes the ACE_Time_Value object from a Win32 FILETIME ACE_Time_Value::ACE_Time_Value (const FILETIME &file_time) { // // ACE_OS_TRACE ("ACE_Time_Value::ACE_Time_Value"); @@ -122,8 +118,7 @@ void ACE_Time_Value::set (const FILETIME &file_time) this->normalize (); } -// Returns the value of the object as a Win32 FILETIME. - +/// Returns the value of the object as a Win32 FILETIME. ACE_Time_Value::operator FILETIME () const { FILETIME file_time; diff --git a/ACE/ace/Time_Value.h b/ACE/ace/Time_Value.h index 0836d3b10f5..eb8bf13492d 100644 --- a/ACE/ace/Time_Value.h +++ b/ACE/ace/Time_Value.h @@ -41,6 +41,9 @@ ACE_END_VERSIONED_NAMESPACE_DECL // ------------------------------------------------------------------- +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + + /** * @class ACE_Time_Value * @@ -51,18 +54,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL * ACE. These time values are typically used in conjunction with OS * mechanisms like <select>, <poll>, or <cond_timedwait>. */ -#if defined (ACE_WIN32) && defined (_WIN32_WCE) -// Something is a bit brain-damaged here and I'm not sure what... this code -// compiled before the OS reorg for ACE 5.4. Since then it hasn't - eVC -// complains that the operators that return ACE_Time_Value are C-linkage -// functions that can't return a C++ class. The only way I've found to -// defeat this is to wrap the whole class in extern "C++". -// - Steve Huston, 23-Aug-2004 -extern "C++" { -#endif - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - class ACE_Export ACE_Time_Value { public: @@ -361,10 +352,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/Time_Value.inl" #endif /* __ACE_INLINE__ */ -#if defined (ACE_WIN32) && defined (_WIN32_WCE) -} -#endif - #if defined (__MINGW32__) ACE_BEGIN_VERSIONED_NAMESPACE_DECL // The MingW linker has problems with the exported statics diff --git a/ACE/ace/Time_Value.inl b/ACE/ace/Time_Value.inl index 4614b7a97c3..5c09dec5f11 100644 --- a/ACE/ace/Time_Value.inl +++ b/ACE/ace/Time_Value.inl @@ -6,18 +6,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -#if defined (ACE_WIN32) && defined (_WIN32_WCE) -// Something is a bit brain-damaged here and I'm not sure what... this code -// compiled before the OS reorg for ACE 5.4. Since then it hasn't - eVC -// complains that the operators that return ACE_Time_Value are C-linkage -// functions that can't return a C++ class. The only way I've found to -// defeat this is to wrap the whole class in extern "C++". -// - Steve Huston, 23-Aug-2004 -extern "C++" { -#endif - -// Returns the value of the object as a timeval. - +/// Returns the value of the object as a timeval. ACE_INLINE ACE_Time_Value::operator timeval () const { @@ -102,10 +91,9 @@ ACE_Time_Value::set (double d) this->normalize (); } -// Initializes a timespec_t. Note that this approach loses precision -// since it converts the nano-seconds into micro-seconds. But then -// again, do any real systems have nano-second timer precision?! - +/// Initializes a timespec_t. Note that this approach loses precision +/// since it converts the nano-seconds into micro-seconds. But then +/// again, do any real systems have nano-second timer precision?! ACE_INLINE void ACE_Time_Value::set (const timespec_t &tv) { @@ -130,8 +118,7 @@ ACE_Time_Value::ACE_Time_Value (time_t sec, suseconds_t usec) this->set (sec, usec); } -// Returns number of seconds. - +/// Returns number of seconds. ACE_INLINE time_t ACE_Time_Value::sec (void) const { @@ -139,8 +126,7 @@ ACE_Time_Value::sec (void) const return this->tv_.tv_sec; } -// Sets the number of seconds. - +/// Sets the number of seconds. ACE_INLINE void ACE_Time_Value::sec (time_t sec) { @@ -148,8 +134,7 @@ ACE_Time_Value::sec (time_t sec) this->tv_.tv_sec = ACE_Utils::truncate_cast<long> (sec); } -// Converts from Time_Value format into milli-seconds format. - +/// Converts from Time_Value format into milli-seconds format. ACE_INLINE unsigned long ACE_Time_Value::msec (void) const { @@ -179,8 +164,7 @@ ACE_Time_Value::msec (ACE_UINT64 &ms) /*const*/ tv->msec (ms); } -// Converts from milli-seconds format into Time_Value format. - +/// Converts from milli-seconds format into Time_Value format. ACE_INLINE void ACE_Time_Value::msec (long milliseconds) { @@ -192,16 +176,14 @@ ACE_Time_Value::msec (long milliseconds) this->tv_.tv_usec = (milliseconds - (secs * 1000)) * 1000; } -// Converts from milli-seconds format into Time_Value format. - +/// Converts from milli-seconds format into Time_Value format. ACE_INLINE void ACE_Time_Value::msec (int milliseconds) { ACE_Time_Value::msec (static_cast<long> (milliseconds)); } -// Returns number of micro-seconds. - +/// Returns number of micro-seconds. ACE_INLINE suseconds_t ACE_Time_Value::usec (void) const { @@ -209,8 +191,7 @@ ACE_Time_Value::usec (void) const return this->tv_.tv_usec; } -// Sets the number of micro-seconds. - +/// Sets the number of micro-seconds. ACE_INLINE void ACE_Time_Value::usec (suseconds_t usec) { @@ -247,8 +228,7 @@ operator * (const ACE_Time_Value &tv, double d) return ACE_Time_Value (tv) *= d; } -// True if tv1 > tv2. - +/// True if tv1 > tv2. ACE_INLINE bool operator > (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) @@ -263,8 +243,7 @@ operator > (const ACE_Time_Value &tv1, return 0; } -// True if tv1 >= tv2. - +/// True if tv1 >= tv2. ACE_INLINE bool operator >= (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) @@ -279,8 +258,7 @@ operator >= (const ACE_Time_Value &tv1, return 0; } -// Returns the value of the object as a timespec_t. - +/// Returns the value of the object as a timespec_t. ACE_INLINE ACE_Time_Value::operator timespec_t () const { @@ -292,8 +270,7 @@ ACE_Time_Value::operator timespec_t () const return tv; } -// Initializes the ACE_Time_Value object from a timespec_t. - +/// Initializes the ACE_Time_Value object from a timespec_t. ACE_INLINE ACE_Time_Value::ACE_Time_Value (const timespec_t &tv) // : tv_ () @@ -302,8 +279,7 @@ ACE_Time_Value::ACE_Time_Value (const timespec_t &tv) this->set (tv); } -// True if tv1 < tv2. - +/// True if tv1 < tv2. ACE_INLINE bool operator < (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) @@ -312,8 +288,7 @@ operator < (const ACE_Time_Value &tv1, return tv2 > tv1; } -// True if tv1 >= tv2. - +/// True if tv1 >= tv2. ACE_INLINE bool operator <= (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) @@ -322,8 +297,7 @@ operator <= (const ACE_Time_Value &tv1, return tv2 >= tv1; } -// True if tv1 == tv2. - +/// True if tv1 == tv2. ACE_INLINE bool operator == (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) @@ -333,8 +307,7 @@ operator == (const ACE_Time_Value &tv1, && tv1.usec () == tv2.usec (); } -// True if tv1 != tv2. - +/// True if tv1 != tv2. ACE_INLINE bool operator != (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) @@ -343,8 +316,7 @@ operator != (const ACE_Time_Value &tv1, return !(tv1 == tv2); } -// Add TV to this. - +/// Add TV to this. ACE_INLINE ACE_Time_Value & ACE_Time_Value::operator+= (const ACE_Time_Value &tv) { @@ -381,8 +353,7 @@ ACE_Time_Value::operator= (time_t tv) return *this; } -// Subtract TV to this. - +/// Subtract TV to this. ACE_INLINE ACE_Time_Value & ACE_Time_Value::operator-= (const ACE_Time_Value &tv) { @@ -401,8 +372,7 @@ ACE_Time_Value::operator-= (time_t tv) return *this; } -// Adds two ACE_Time_Value objects together, returns the sum. - +/// Adds two ACE_Time_Value objects together, returns the sum. ACE_INLINE ACE_Time_Value operator + (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) @@ -414,8 +384,7 @@ operator + (const ACE_Time_Value &tv1, return sum; } -// Subtracts two ACE_Time_Value objects, returns the difference. - +/// Subtracts two ACE_Time_Value objects, returns the difference. ACE_INLINE ACE_Time_Value operator - (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2) @@ -427,8 +396,4 @@ operator - (const ACE_Time_Value &tv1, return delta; } -#if defined (ACE_WIN32) && defined (_WIN32_WCE) -} -#endif - ACE_END_VERSIONED_NAMESPACE_DECL |