diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-12-08 19:01:22 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-12-08 19:01:22 +0000 |
commit | 095bfed6418ada94b0b82799328f7c93fc8d61dc (patch) | |
tree | 228d8f14ceddb97c99eaedab3686f21b510f17ea /ace | |
parent | 0be9bd0b8324e6008c0aa952ff2b5361c2cc2bd4 (diff) | |
download | ATCD-095bfed6418ada94b0b82799328f7c93fc8d61dc.tar.gz |
ChangeLogTag:Sat Dec 8 09:39:48 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu>
Diffstat (limited to 'ace')
-rw-r--r-- | ace/High_Res_Timer.cpp | 4 | ||||
-rw-r--r-- | ace/High_Res_Timer.i | 4 | ||||
-rw-r--r-- | ace/OS.cpp | 10 | ||||
-rw-r--r-- | ace/OS.h | 10 | ||||
-rw-r--r-- | ace/OS.i | 4 | ||||
-rw-r--r-- | ace/Profile_Timer.cpp | 4 | ||||
-rw-r--r-- | ace/config-win32-common.h | 2 | ||||
-rw-r--r-- | ace/config-win32-ghs.h | 3 |
8 files changed, 22 insertions, 19 deletions
diff --git a/ace/High_Res_Timer.cpp b/ace/High_Res_Timer.cpp index 3bf9954cc37..c589ab67abc 100644 --- a/ace/High_Res_Timer.cpp +++ b/ace/High_Res_Timer.cpp @@ -189,7 +189,7 @@ ACE_High_Res_Timer::global_scale_factor (void) if (::QueryPerformanceFrequency (&freq)) { // We have a high-res timer -# if defined (ghs) +# if defined (ACE_LACKS_LONGLONG_T) ACE_UINT64 uint64_freq(freq.u.LowPart, (ACE_UINT32) freq.u.HighPart); ACE_High_Res_Timer::global_scale_factor (uint64_freq / (ACE_UINT32) ACE_ONE_SECOND_IN_USECS); @@ -197,7 +197,7 @@ ACE_High_Res_Timer::global_scale_factor (void) ACE_High_Res_Timer::global_scale_factor (ACE_static_cast (unsigned int, freq.QuadPart / ACE_HR_SCALE_CONVERSION)); -# endif // (ghs) +# endif // (ACE_LACKS_LONGLONG_T) ACE_High_Res_Timer::global_scale_factor_status_ = 1; } diff --git a/ace/High_Res_Timer.i b/ace/High_Res_Timer.i index dd1ac373154..34c494dce16 100644 --- a/ace/High_Res_Timer.i +++ b/ace/High_Res_Timer.i @@ -31,11 +31,11 @@ ACE_High_Res_Timer::hrtime_to_tv (ACE_Time_Value &tv, ACE_hrtime_t subsec = hrt - tmp; // Remainder of ticks < 1sec ACE_UINT32 msec = (ACE_UINT32) (subsec / global_scale_factor ()); // #msec ACE_hrtime_t usec64 = subsec - (msec * global_scale_factor ()); -# if defined (ghs) +# if defined (ACE_LACKS_LONGLONG_T) ACE_UINT32 usec = usec64.lo(); # else ACE_UINT32 usec = (ACE_UINT32) usec64; -# endif +# endif // ACE_LACKS_LONGLONG_T // (tick * usec/msec) / tick/msec = usec usec = (usec * 1000) / (ACE_UINT32) global_scale_factor (); tv.usec ((msec * 1000) + usec); diff --git a/ace/OS.cpp b/ace/OS.cpp index 7a2ce2b44dc..5d9babf5367 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -294,7 +294,7 @@ ACE_Time_Value::operator -- (void) // // 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 (ghs) +# if defined (ACE_LACKS_LONGLONG_T) const ACE_U_LongLong ACE_Time_Value::FILETIME_to_timval_skew = ACE_U_LongLong (0xd53e8000, 0x19db1de); # else @@ -313,7 +313,7 @@ ACE_Time_Value::ACE_Time_Value (const FILETIME &file_time) void ACE_Time_Value::set (const FILETIME &file_time) { // Initializes the ACE_Time_Value object from a Win32 FILETIME -#if defined (ghs) +#if defined (ACE_LACKS_LONGLONG_T) ACE_U_LongLong LL_100ns(file_time.dwLowDateTime, file_time.dwHighDateTime); LL_100ns -= ACE_Time_Value::FILETIME_to_timval_skew; // Convert 100ns units to seconds; @@ -332,7 +332,7 @@ void ACE_Time_Value::set (const FILETIME &file_time) this->tv_.tv_sec = (long) (_100ns.QuadPart / (10000 * 1000)); // Convert remainder to microseconds; this->tv_.tv_usec = (long) ((_100ns.QuadPart % (10000 * 1000)) / 10); -#endif // ghs +#endif // ACE_LACKS_LONGLONG_T } // Returns the value of the object as a Win32 FILETIME. @@ -342,7 +342,7 @@ ACE_Time_Value::operator FILETIME () const FILETIME file_time; ACE_OS_TRACE ("ACE_Time_Value::operator FILETIME"); -#if defined (ghs) +#if defined (ACE_LACKS_LONGLONG_T) ACE_U_LongLong LL_sec(this->tv_.tv_sec); ACE_U_LongLong LL_usec(this->tv_.tv_usec); ACE_U_LongLong LL_100ns = LL_sec * (ACE_UINT32)(10000 * 1000) + @@ -358,7 +358,7 @@ ACE_Time_Value::operator FILETIME () const file_time.dwLowDateTime = _100ns.LowPart; file_time.dwHighDateTime = _100ns.HighPart; -#endif //ghs +#endif //ACE_LACKS_LONGLONG_T return file_time; } @@ -1088,7 +1088,7 @@ ACE_OS_Export ACE_Time_Value operator - (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2); // This forward declaration is needed by the set() and FILETIME() functions -#if defined (ghs) +#if defined (ACE_LACKS_LONGLONG_T) class ACE_Export ACE_U_LongLong; #endif //ghs // ------------------------------------------------------------------- @@ -1255,11 +1255,11 @@ public: # if defined (ACE_WIN32) /// Const time difference between FILETIME and POSIX time. -# if defined (ghs) +# if defined (ACE_LACKS_LONGLONG_T) static const ACE_U_LongLong FILETIME_to_timval_skew; # else static const DWORDLONG FILETIME_to_timval_skew; -# endif // ghs +# endif // ACE_LACKS_LONGLONG_T # endif /* ACE_WIN32 */ private: @@ -3529,7 +3529,7 @@ typedef HANDLE ACE_hthread_t; typedef DWORD ACE_thread_key_t; # endif /* ! ACE_HAS_TSS_EMULATION */ -# if !defined (ghs) +# if !defined (ACE_LACKS_LONGLONG_T) // 64-bit quad-word definitions. typedef unsigned __int64 ACE_QWORD; typedef unsigned __int64 ACE_hrtime_t; @@ -3539,7 +3539,7 @@ inline DWORD ACE_HIGH_DWORD (ACE_QWORD q) { return (DWORD) (q >> 32); } # else // Can't find ANY place that ACE_QWORD is used, but hrtime_t is. typedef ACE_UINT64 ACE_hrtime_t; -# endif +# endif // ACE_LACKS_LONGLONG_T // Win32 dummies to help compilation. @@ -10790,12 +10790,12 @@ ACE_OS::gethrtime (const ACE_HRTimer_Op op) ::QueryPerformanceCounter (&freq); -# if defined (ghs) +# if defined (ACE_LACKS_LONGLONG_T) ACE_UINT64 uint64_freq(freq.u.LowPart, ACE_static_cast (unsigned int, freq.u.HighPart)); return uint64_freq; # else return freq.QuadPart; -# endif //ghs +# endif //ACE_LACKS_LONGLONG_T #elif defined (CHORUS) if (op == ACE_OS::ACE_HRTIMER_GETTIME) diff --git a/ace/Profile_Timer.cpp b/ace/Profile_Timer.cpp index 80f5b2155ce..2f4ef9f8f87 100644 --- a/ace/Profile_Timer.cpp +++ b/ace/Profile_Timer.cpp @@ -288,11 +288,11 @@ ACE_Profile_Timer::elapsed_time (ACE_Elapsed_Time &et) ACE_hrtime_t delta_t; // nanoseconds timer_.elapsed_time (delta_t); -# if defined (ghs) +# if defined (ACE_LACKS_LONGLONG_T) et.real_time = delta_t / (double) ACE_ONE_SECOND_IN_NSECS; # else et.real_time = (__int64) delta_t / (double) ACE_ONE_SECOND_IN_NSECS; -# endif /* ghs */ +# endif /* ACE_LACKS_LONGLONG_T */ # if defined (ACE_HAS_GETRUSAGE) ACE_Time_Value atv = ACE_Time_Value (this->end_usage_.ru_utime) - ACE_Time_Value (this->begin_usage_.ru_utime); diff --git a/ace/config-win32-common.h b/ace/config-win32-common.h index c66b41dde9d..93f55fc4e7f 100644 --- a/ace/config-win32-common.h +++ b/ace/config-win32-common.h @@ -219,7 +219,7 @@ #define ACE_SIZEOF_LONG_LONG 8 // Green Hills Native x86 does not support __int64 keyword // Neither does mingw32. -#if !defined (ghs) && !defined (__MINGW32__) +#if !defined (ACE_LACKS_LONGLONG_T) && !defined (__MINGW32__) typedef unsigned __int64 ACE_UINT64; #endif /* (ghs) */ diff --git a/ace/config-win32-ghs.h b/ace/config-win32-ghs.h index 0b83b22e14d..bebd8a53e70 100644 --- a/ace/config-win32-ghs.h +++ b/ace/config-win32-ghs.h @@ -95,6 +95,9 @@ // Set the following to zero to placate SString.h ACE_WString CTOR # undef ACE_WSTRING_HAS_USHORT_SUPPORT +// Green Hills Native x86 does not support __int64 keyword +# define ACE_LACKS_LONGLONG_T + /* need to ensure these are included before <iomanip> */ # include <time.h> # include <stdlib.h> |