diff options
91 files changed, 233 insertions, 3149 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index 1a9d014eaf2..65802e8ce61 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,50 @@ +Tue May 15 18:16:09 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl> + + * ace/ACE.inl: + * ace/Atomic_Op_T.h: + * ace/Basic_Types.h: + * ace/Basic_Types.inl: + * ace/Basic_Types.cpp: + * ace/CDR_Base.h: + * ace/Functor.h: + * ace/Functor.inl: + * ace/Handle_Set.cpp: + * ace/High_Res_Timer.cpp: + * ace/Log_Msg.cpp: + * ace/Numeric_Limits.h: + * ace/OS_NS_Thread.inl: + * ace/OS_NS_Thread.cpp: + * ace/OS_NS_stdlib.inl: + * ace/OS_NS_sys_select.inl: + * ace/OS_NS_sys_wait.inl: + * ace/OS_NS_time.h: + * ace/OS_NS_time.inl: + * ace/OS_NS_unistd.inl: + * ace/Profile_Timer.cpp: + * ace/Sched_Params.cpp: + * ace/Stats.cpp: + * ace/Task.cpp: + * ace/Throughput_Stats.cpp: + * ace/Time_Value.h: + * ace/Time_Value.inl: + * ace/Truncate.h: + * ace/UUID.cpp: + * ace/os_include/os_pthread.h: + * performance-tests/Server_Concurrency/Latency_Stats.h: + * performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp: + * performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp: + * performance-tests/UDP/udp_test.cpp: + * tests/Atomic_Op_Test.cpp: + * tests/Basic_Types_Test.cpp: + * tests/CDR_Array_Test.cpp: + Removed support for Tandem NSK. That was the last platform that + needed the emulated versions of ACE_INT64 and ACE_UINT64, that + emulation has now been removed + + * ace/config-tandem-nsk-mips-v2.h: + * ace/config-tandem-nsk-mips-v3.h: + Removed these files. + Mon May 14 18:48:14 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl> * performance-tests/Server_Concurrency/Latency_Stats.h: diff --git a/ACE/ace/ACE.inl b/ACE/ace/ACE.inl index c114deb90ee..758a88a11a1 100644 --- a/ACE/ace/ACE.inl +++ b/ACE/ace/ACE.inl @@ -230,7 +230,7 @@ ACE::send_i (ACE_HANDLE handle, const void *buf, size_t len) ACE_INLINE ssize_t ACE::recv_i (ACE_HANDLE handle, void *buf, size_t len) { -#if defined (ACE_WIN32) || defined (ACE_OPENVMS) || defined (ACE_TANDEM_T1248_PTHREADS) +#if defined (ACE_WIN32) || defined (ACE_OPENVMS) return ACE_OS::recv (handle, (char *) buf, len); #else return ACE_OS::read (handle, (char *) buf, len); diff --git a/ACE/ace/Atomic_Op_T.h b/ACE/ace/Atomic_Op_T.h index 1e3c53a3f3a..b2be486c8df 100644 --- a/ACE/ace/Atomic_Op_T.h +++ b/ACE/ace/Atomic_Op_T.h @@ -88,22 +88,17 @@ struct ACE_Type_Traits<unsigned long> typedef unsigned long parameter_type; }; -#ifndef ACE_LACKS_LONGLONG_T template<> struct ACE_Type_Traits<long long> { typedef long long parameter_type; }; -#endif /* !ACE_LACKS_LONGLONG_T */ -#if !defined (ACE_LACKS_LONGLONG_T) \ - && !defined (ACE_LACKS_UNSIGNEDLONGLONG_T) template<> struct ACE_Type_Traits<unsigned long long> { typedef unsigned long long parameter_type; }; -#endif /* !ACE_LACKS_LONGLONG_T && !ACE_LACKS_UNSIGNEDLONGLONG_T */ template<> struct ACE_Type_Traits<float> diff --git a/ACE/ace/Basic_Types.cpp b/ACE/ace/Basic_Types.cpp index 7edb337d253..37391876d52 100644 --- a/ACE/ace/Basic_Types.cpp +++ b/ACE/ace/Basic_Types.cpp @@ -5,132 +5,3 @@ #if !defined (__ACE_INLINE__) # include "ace/Basic_Types.inl" #endif /* ! __ACE_INLINE__ */ - - -#if defined (ACE_LACKS_LONGLONG_T) && !defined (ACE_LACKS_UNSIGNEDLONGLONG_T) -# include "ace/Log_Msg.h" -# include "ace/OS_NS_stdio.h" -# include "ace/OS_NS_string.h" -# if !defined (ACE_LACKS_IOSTREAM_TOTALLY) -// FUZZ: disable check_for_streams_include -# include "ace/streams.h" -# endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -void -ACE_U_LongLong::output (FILE *file) const -{ - if (h_ () > 0) - ACE_OS::fprintf (file, "0x%lx%0*lx", h_ (), 2 * sizeof l_ (), l_ ()); - else - ACE_OS::fprintf (file, "0x%lx", l_ ()); -} - - -ACE_TCHAR * -ACE_U_LongLong::as_string (ACE_TCHAR *output, - unsigned int base, - unsigned int uppercase) const -{ - if (*this == 0) - { - ACE_OS::strcpy(output, "0"); - } - else - { - switch(base) - { - case 8: - { - unsigned int index = 0; - int bshift = 31; - while(bshift >= 1) - { - unsigned int sval = (this->h_ () >> bshift) & 7; - if (sval > 0 || index != 0) - { - output[index] = sval + '0'; - ++index; - } - bshift -= 3; - } - bshift = 30; - while(bshift >= 0) - { - unsigned int sval = (this->l_ () >> bshift) & 7; - // Combine the last bit of hi with the first 3-bit digit - if (bshift == 30) - { - sval |= (this->h_ () & 1) << 2; - } - if (sval > 0 || index != 0) - { - output[index] = sval + '0'; - ++index; - } - bshift -= 3; - } - output[index] = '\0'; - break; - } - case 10: - { - ACE_OS::sprintf(output, "%.0f", *this / 1.0); - break; - } - case 16: - { - if (this->h_ () != 0) - { - ACE_OS::sprintf(output, - (uppercase ? "%lX%0*lX" : "%lx%0*lx"), - this->h_ (), 2 * sizeof this->l_ (), - this->l_ ()); - } - else - { - ACE_OS::sprintf(output, - (uppercase ? "%lX" : "%lx"), this->l_ ()); - - } - break; - } - default: - { - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("Unsupported base = %u\n"), base)); - output[0] = '\0'; - } - } - } - - return output; -} - - -# if !defined (ACE_LACKS_IOSTREAM_TOTALLY) -ostream& -operator<< (ostream& os, const ACE_U_LongLong& ll) -{ -#ifdef __TANDEM && (__CPLUSPLUS_VERSION >= 3) - unsigned long flags = os.flags(); -#else - unsigned long flags = os.setf(0); -#endif - char buffer[32]; - - if ((flags & ios::oct) != 0) - os << ll.as_string (buffer, 8); - else if ((flags & ios::hex) != 0) - os << ll.as_string (buffer, 16, (flags & ios::uppercase)); - else - os << ll.as_string (buffer); - return os; -} -# endif - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_LACKS_LONGLONG_T */ - diff --git a/ACE/ace/Basic_Types.h b/ACE/ace/Basic_Types.h index 7153552084d..305e74449dd 100644 --- a/ACE/ace/Basic_Types.h +++ b/ACE/ace/Basic_Types.h @@ -32,13 +32,10 @@ * - ACE_INT32 * - ACE_UINT32 * - ACE_UINT64 - * (@note ACE_INT64 is partly defined, there is no ACE_LongLong for - * platforms that don't have a native 8-byte integer type.) + * - ACE_INT64 * * Byte-order (endian-ness) determination: * ACE_BYTE_ORDER, to either ACE_BIG_ENDIAN or ACE_LITTLE_ENDIAN - * - * */ //============================================================================= @@ -59,10 +56,6 @@ # include "ace/os_include/os_stdlib.h" // Other types # include "ace/os_include/os_stddef.h" // Get ptrdiff_t - see further comments below -# if defined(ACE_LACKS_LONGLONG_T) -# include "ace/os_include/os_stdio.h" // For long long emulation -# endif /* ACE_LACKS_LONGLONG_T */ - # include "ace/os_include/sys/os_types.h" # if !defined (ACE_LACKS_SYS_PARAM_H) @@ -99,15 +92,11 @@ typedef ACE::If_Then_Else< ACE::If_Then_Else< (sizeof (void*) == sizeof (signed long)), signed long, -#ifdef ACE_LACKS_LONGLONG_T - void /* Unknown. Force an invalid type */ -#else ACE::If_Then_Else< (sizeof (void*) == sizeof (signed long long)), signed long long, void /* Unknown. Force an invalid type */ >::result_type -#endif /* ACE_LACKS_LONGLONG_T */ >::result_type >::result_type intptr_t; @@ -194,9 +183,7 @@ typedef ACE::If_Then_Else< // The number of bytes in a long long. # if !defined (ACE_SIZEOF_LONG_LONG) -# if defined (ACE_LACKS_LONGLONG_T) -# define ACE_SIZEOF_LONG_LONG 8 -# elif defined (ULLONG_MAX) +# if defined (ULLONG_MAX) # if ((ULLONG_MAX) == 4294967295ULL) # define ACE_SIZEOF_LONG_LONG 4 # elif ((ULLONG_MAX) == 18446744073709551615ULL) @@ -298,7 +285,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef int64_t ACE_INT64; #elif ACE_SIZEOF_LONG == 8 typedef long ACE_INT64; -#elif !defined (ACE_LACKS_LONGLONG_T) && ACE_SIZEOF_LONG_LONG == 8 +#elif ACE_SIZEOF_LONG_LONG == 8 # ifdef __GNUC__ // Silence g++ "-pedantic" warnings regarding use of "long long" // type. @@ -307,24 +294,20 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL typedef long long ACE_INT64; #endif /* defined (ACE_INT64_TYPE) */ -#if !(defined (ACE_LACKS_LONGLONG_T) || defined (ACE_LACKS_UNSIGNEDLONGLONG_T)) -/* See matching #if around ACE_U_LongLong class declaration below */ - -# if defined (ACE_UINT64_TYPE) +#if defined (ACE_UINT64_TYPE) typedef ACE_UINT64_TYPE ACE_UINT64; -# elif defined (ACE_HAS_UINT64_T) +#elif defined (ACE_HAS_UINT64_T) typedef uint64_t ACE_UINT64; -# elif ACE_SIZEOF_LONG == 8 +#elif ACE_SIZEOF_LONG == 8 typedef unsigned long ACE_UINT64; -# elif ACE_SIZEOF_LONG_LONG == 8 +#elif ACE_SIZEOF_LONG_LONG == 8 # ifdef __GNUC__ // Silence g++ "-pedantic" warnings regarding use of "long long" // type. __extension__ # endif /* __GNUC__ */ typedef unsigned long long ACE_UINT64; -# endif /* defined (ACE_UINT64_TYPE) */ -#endif /* !(ACE_LACKS_LONGLONG_T || ACE_LACKS_UNSIGNEDLONGLONG_T) */ +#endif /* defined (ACE_UINT64_TYPE) */ /// Define a generic byte for use in codecs typedef unsigned char ACE_Byte; @@ -424,25 +407,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL # define ACE_NTOHS(x) x # endif /* ACE_LITTLE_ENDIAN */ -#if defined (ACE_LACKS_LONGLONG_T) - // This throws away the high 32 bits. It's very unlikely that a - // pointer will be more than 32 bits wide if the platform does not - // support 64-bit integers. -# define ACE_LONGLONG_TO_PTR(PTR_TYPE, L) \ - reinterpret_cast<PTR_TYPE> (L.lo ()) -#elif defined (ACE_OPENVMS) && (!defined (__INITIAL_POINTER_SIZE) || (__INITIAL_POINTER_SIZE < 64)) -# define ACE_LONGLONG_TO_PTR(PTR_TYPE, L) \ - reinterpret_cast<PTR_TYPE> (static_cast<int> (L)) -#else /* ! ACE_LACKS_LONGLONG_T */ -# define ACE_LONGLONG_TO_PTR(PTR_TYPE, L) \ - reinterpret_cast<PTR_TYPE> (static_cast<intptr_t> (L)) -#endif /* ! ACE_LACKS_LONGLONG_T */ - -// If the platform lacks an unsigned long long, define one. -#if defined (ACE_LACKS_LONGLONG_T) || defined (ACE_LACKS_UNSIGNEDLONGLONG_T) -// Forward declaration for streams -# include "ace/iosfwd.h" - ACE_BEGIN_VERSIONED_NAMESPACE_DECL /** @@ -626,38 +590,10 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL #endif // ACE_LACKS_UNSIGNEDLONGLONG_T }; - typedef ACE_U_LongLong ACE_UINT64; - -#if !defined (ACE_LACKS_IOSTREAM_TOTALLY) - ostream &operator<< (ostream &, const ACE_U_LongLong &); -#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */ - ACE_END_VERSIONED_NAMESPACE_DECL -# endif /* ACE_LACKS_LONGLONG_T */ - ACE_BEGIN_VERSIONED_NAMESPACE_DECL -// Conversions from ACE_UINT64 to ACE_UINT32. ACE_CU64_TO_CU32 should -// be used on const ACE_UINT64's. -# if defined (ACE_LACKS_LONGLONG_T) || defined (ACE_LACKS_UNSIGNEDLONGLONG_T) -inline ACE_UINT32 -ACE_U64_TO_U32 (ACE_U_LongLong const & n) -{ - /** - * @note We could add a cast operator to ACE_U_LongLong but that may - * cause more problems than it solves. Force users to perform - * an explicit cast via ACE_{C}U64_TO_{C}U32. - */ - return n.lo (); -} - -inline ACE_UINT32 -ACE_CU64_TO_CU32 (ACE_U_LongLong const & n) -{ - return ACE_U64_TO_U32 (n); -} -# else /* ! ACE_LACKS_LONGLONG_T */ inline ACE_UINT32 ACE_U64_TO_U32 (ACE_UINT64 n) { @@ -669,32 +605,24 @@ ACE_CU64_TO_CU32 (ACE_UINT64 n) { return static_cast<ACE_UINT32> (n); } -# endif /* ! ACE_LACKS_LONGLONG_T */ ACE_END_VERSIONED_NAMESPACE_DECL -// 64-bit literals require special marking on some platforms. -# if defined (ACE_LACKS_LONGLONG_T) - // Can only specify 32-bit arguments. -# define ACE_UINT64_LITERAL(n) n ## UL - // This one won't really work, but it'll keep - // some compilers happy until we have better support -# define ACE_INT64_LITERAL(n) n ## L -# elif defined (ACE_WIN32) -# if defined (__MINGW32__) -# define ACE_UINT64_LITERAL(n) n ## ull -# define ACE_INT64_LITERAL(n) n ## ll -# else -# define ACE_UINT64_LITERAL(n) n ## ui64 -# define ACE_INT64_LITERAL(n) n ## i64 -# endif /* defined (__MINGW32__) */ -# elif defined (__TANDEM) +#if defined (ACE_WIN32) +# if defined (__MINGW32__) +# define ACE_UINT64_LITERAL(n) n ## ull +# define ACE_INT64_LITERAL(n) n ## ll +# else +# define ACE_UINT64_LITERAL(n) n ## ui64 +# define ACE_INT64_LITERAL(n) n ## i64 +# endif /* defined (__MINGW32__) */ +#elif defined (__TANDEM) # define ACE_UINT64_LITERAL(n) n ## LL # define ACE_INT64_LITERAL(n) n ## LL -# else /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */ +#else /* ! ACE_WIN32 */ # define ACE_UINT64_LITERAL(n) n ## ull # define ACE_INT64_LITERAL(n) n ## ll -# endif /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */ +#endif /* ! ACE_WIN32*/ #if !defined (ACE_INT8_FORMAT_SPECIFIER_ASCII) # if defined (PRId8) @@ -858,16 +786,11 @@ ACE_END_VERSIONED_NAMESPACE_DECL // Cast from UINT64 to a double requires an intermediate cast to INT64 // on some platforms. -# if defined (ACE_LACKS_LONGLONG_T) - // Only use the low 32 bits. -# define ACE_UINT64_DBLCAST_ADAPTER(n) ACE_U64_TO_U32 (n) -# elif defined (ACE_LACKS_UNSIGNEDLONGLONG_T) -# define ACE_UINT64_DBLCAST_ADAPTER(n) ((n).to_int64 ()) -# elif defined (ACE_WIN32) -# define ACE_UINT64_DBLCAST_ADAPTER(n) static_cast<__int64> (n) -# else /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */ -# define ACE_UINT64_DBLCAST_ADAPTER(n) (n) -# endif /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */ +#if defined (ACE_WIN32) +# define ACE_UINT64_DBLCAST_ADAPTER(n) static_cast<__int64> (n) +#else /* ! ACE_WIN32 && */ +# define ACE_UINT64_DBLCAST_ADAPTER(n) (n) +#endif /* ! ACE_WIN32 && */ // The number of bytes in a float. @@ -930,19 +853,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL #define ACE_UINT32_MAX 0xFFFFFFFF #define ACE_INT64_MAX ACE_INT64_LITERAL(0x7FFFFFFFFFFFFFFF) #define ACE_INT64_MIN -(ACE_INT64_MAX)-1 - -#if defined (ACE_LACKS_UNSIGNEDLONGLONG_T) -// ACE_U_LongLong's constructor accepts a "long long" in this -// case. Set it to ACE_U_LongLong (-1) since the bit pattern for long -// long (-1) is the same as the maximum unsigned long long value. -# define ACE_UINT64_MAX ACE_U_LongLong (ACE_INT64_LITERAL (0xFFFFFFFFFFFFFFFF)) -#elif defined (ACE_LACKS_LONGLONG_T) -// ACE_U_LongLong's constructor accepts an ACE_UINT32 low and high -// pair of parameters. -# define ACE_UINT64_MAX ACE_U_LongLong (0xFFFFFFFFu, 0xFFFFFFFFu) -#else -# define ACE_UINT64_MAX ACE_UINT64_LITERAL (0xFFFFFFFFFFFFFFFF) -#endif /* ACE_LACKS_UNSIGNEDLONGLONG_T */ +#define ACE_UINT64_MAX ACE_UINT64_LITERAL (0xFFFFFFFFFFFFFFFF) // These use ANSI/IEEE format. #define ACE_FLT_MAX 3.402823466e+38F diff --git a/ACE/ace/Basic_Types.inl b/ACE/ace/Basic_Types.inl index 15f9a9a1ab6..7f2b3228624 100644 --- a/ACE/ace/Basic_Types.inl +++ b/ACE/ace/Basic_Types.inl @@ -1,954 +1,3 @@ // -*- C++ -*- -// // $Id$ -# if !defined (ACE_LACKS_LONGLONG_T) && defined (ACE_LACKS_UNSIGNEDLONGLONG_T) - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Implementation for ACE_U_LongLong when we have signed long long -// but no unsigned long long. - -ACE_INLINE -ACE_U_LongLong::ACE_U_LongLong (const long long value) - : data_ (value) -{ -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::hi (void) const -{ - return (data_ >> 32) & 0xFFFFFFFF; -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::lo (void) const -{ - return data_ & 0xFFFFFFFF; -} - -ACE_INLINE void -ACE_U_LongLong::hi (const ACE_UINT32 hi) -{ - data_ = hi; - data_ <<= 32; -} - -ACE_INLINE void -ACE_U_LongLong::lo (const ACE_UINT32 lo) -{ - data_ = lo; -} - -ACE_INLINE long long -ACE_U_LongLong::to_int64 (void) const -{ - return data_; -} - -ACE_INLINE -ACE_U_LongLong::~ACE_U_LongLong (void) -{ -} - -ACE_INLINE bool -ACE_U_LongLong::operator== (const ACE_U_LongLong &n) const -{ - return data_ == n.data_; -} - -ACE_INLINE bool -ACE_U_LongLong::operator== (const ACE_UINT32 n) const -{ - return data_ == n; -} - -ACE_INLINE bool -ACE_U_LongLong::operator!= (const ACE_U_LongLong &n) const -{ - return ! (*this == n); -} - -ACE_INLINE bool -ACE_U_LongLong::operator!= (const ACE_UINT32 n) const -{ - return ! (*this == n); -} - -ACE_INLINE bool -ACE_U_LongLong::operator< (const ACE_U_LongLong &n) const -{ - if (data_ > 0) - if (n.data_ > 0) - return data_ < n.data_; - else - return true; - else - if (n.data_ > 0) - return false; - else - return data_ < n.data_; -} - -ACE_INLINE bool -ACE_U_LongLong::operator< (const ACE_UINT32 n) const -{ - return operator< (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE bool -ACE_U_LongLong::operator<= (const ACE_U_LongLong &n) const -{ - if (data_ == n.data_) return true; - - return data_ < n.data_; -} - -ACE_INLINE bool -ACE_U_LongLong::operator<= (const ACE_UINT32 n) const -{ - return operator<= (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE bool -ACE_U_LongLong::operator> (const ACE_U_LongLong &n) const -{ - if (data_ > 0) - if (n.data_ > 0) - return data_ > n.data_; - else - return false; - else - if (n.data_ > 0) - return true; - else - return data_ > n.data_; -} - -ACE_INLINE bool -ACE_U_LongLong::operator> (const ACE_UINT32 n) const -{ - return operator> (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE bool -ACE_U_LongLong::operator>= (const ACE_U_LongLong &n) const -{ - if (data_ == n.data_) return true; - - return data_ > n.data_; -} - -ACE_INLINE bool -ACE_U_LongLong::operator>= (const ACE_UINT32 n) const -{ - return operator>= (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE -ACE_U_LongLong::ACE_U_LongLong (const ACE_U_LongLong &n) - : data_ (n.data_) -{ -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator= (const ACE_U_LongLong &n) -{ - data_ = n.data_; - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator= (const ACE_INT32 &rhs) -{ - if (rhs >= 0) - { - data_ = rhs; - data_ &= 0xFFFFFFFF; - } - else - { - // We do not handle the case where a negative 32 bit integer is - // assigned to this representation of a 64 bit unsigned integer. - // The "undefined behavior" behavior performed by this - // implementation is to simply set all bits to zero. - data_ = 0; - } - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator= (const ACE_UINT32 &rhs) -{ - data_ = rhs; - - return *this; -} - - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator+ (const ACE_U_LongLong &n) const -{ - return data_ + n.data_; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator+ (const ACE_UINT32 n) const -{ - return operator+ (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator- (const ACE_U_LongLong &n) const -{ - return data_ - n.data_; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator- (const ACE_UINT32 n) const -{ - return operator- (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator<< (const u_int n) const -{ - return data_ << n; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator<<= (const u_int n) -{ - data_ <<= n; - - return *this; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator>> (const u_int n) const -{ - return data_ >> n; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator>>= (const u_int n) -{ - data_ >>= n; - - return *this; -} - -ACE_INLINE double -ACE_U_LongLong::operator/ (const double n) const -{ - return data_ / n; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator+= (const ACE_U_LongLong &n) -{ - data_ += n.data_; - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator+= (const ACE_UINT32 n) -{ - return operator+= (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator* (const ACE_UINT32 n) const -{ - return data_ * n; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator*= (const ACE_UINT32 n) -{ - data_ *= n; - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator-= (const ACE_U_LongLong &n) -{ - data_ -= n.data_; - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator-= (const ACE_UINT32 n) -{ - return operator-= (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator++ () -{ - ++data_; - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator-- () -{ - --data_; - - return *this; -} - -ACE_INLINE const ACE_U_LongLong -ACE_U_LongLong::operator++ (int) -{ - // Post-increment operator should always be implemented in terms of - // the pre-increment operator to enforce consistent semantics. - ACE_U_LongLong temp (*this); - ++*this; - return temp; -} - -ACE_INLINE const ACE_U_LongLong -ACE_U_LongLong::operator-- (int) -{ - // Post-decrement operator should always be implemented in terms of - // the pre-decrement operator to enforce consistent semantics. - ACE_U_LongLong temp (*this); - --*this; - return temp; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator|= (const ACE_U_LongLong n) -{ - data_ |= n.data_; - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator|= (const ACE_UINT32 n) -{ - return operator|= (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator&= (const ACE_U_LongLong n) -{ - data_ &= n.data_; - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator&= (const ACE_UINT32 n) -{ - return operator&= (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const ACE_UINT32 n) const -{ - return data_ / n; -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator% (const ACE_UINT32 n) const -{ - return data_ % n; -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator| (const ACE_INT32 n) const -{ - return data_ | n; -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator& (const ACE_INT32 n) const -{ - return data_ & n; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator* (const ACE_INT32 n) const -{ - return operator* ((ACE_UINT32) n); -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator*= (const ACE_INT32 n) -{ - return operator*= ((ACE_UINT32) n); -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const ACE_INT32 n) const -{ - return operator/ ((ACE_UINT32) n); -} - -#if ACE_SIZEOF_INT == 4 -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const u_long n) const -{ - return operator/ ((ACE_UINT32) n); -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const long n) const -{ - return operator/ ((ACE_UINT32) n); -} - -#else /* ACE_SIZEOF_INT != 4 */ -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const u_int n) const -{ - return operator/ ((ACE_UINT32) n); -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const int n) const -{ - return operator/ ((ACE_UINT32) n); -} -#endif - -ACE_END_VERSIONED_NAMESPACE_DECL - -#elif defined (ACE_LACKS_LONGLONG_T) - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_U_LongLong::ACE_U_LongLong (const ACE_UINT32 lo, const ACE_UINT32 hi) -{ - h_ () = hi; - l_ () = lo; -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::hi (void) const -{ - return h_ (); -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::lo (void) const -{ - return l_ (); -} - -ACE_INLINE void -ACE_U_LongLong::hi (const ACE_UINT32 hi) -{ - h_ () = hi; -} - -ACE_INLINE void -ACE_U_LongLong::lo (const ACE_UINT32 lo) -{ - l_ () = lo; -} - -ACE_INLINE -ACE_U_LongLong::~ACE_U_LongLong (void) -{ -} - -ACE_INLINE bool -ACE_U_LongLong::operator== (const ACE_U_LongLong &n) const -{ - return h_ () == n.h_ () && l_ () == n.l_ (); -} - -ACE_INLINE bool -ACE_U_LongLong::operator== (const ACE_UINT32 n) const -{ - return h_ () == 0 && l_ () == n; -} - -ACE_INLINE bool -ACE_U_LongLong::operator!= (const ACE_U_LongLong &n) const -{ - return ! (*this == n); -} - -ACE_INLINE bool -ACE_U_LongLong::operator!= (const ACE_UINT32 n) const -{ - return ! (*this == n); -} - -ACE_INLINE bool -ACE_U_LongLong::operator< (const ACE_U_LongLong &n) const -{ - return h_ () < n.h_ () ? 1 - : h_ () > n.h_ () ? 0 - : l_ () < n.l_ (); -} - -ACE_INLINE bool -ACE_U_LongLong::operator< (const ACE_UINT32 n) const -{ - return operator< (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE bool -ACE_U_LongLong::operator<= (const ACE_U_LongLong &n) const -{ - return h_ () < n.h_ () ? 1 - : h_ () > n.h_ () ? 0 - : l_ () <= n.l_ (); -} - -ACE_INLINE bool -ACE_U_LongLong::operator<= (const ACE_UINT32 n) const -{ - return operator<= (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE bool -ACE_U_LongLong::operator> (const ACE_U_LongLong &n) const -{ - return h_ () > n.h_ () ? 1 - : h_ () < n.h_ () ? 0 - : l_ () > n.l_ (); -} - -ACE_INLINE bool -ACE_U_LongLong::operator> (const ACE_UINT32 n) const -{ - return operator> (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE bool -ACE_U_LongLong::operator>= (const ACE_U_LongLong &n) const -{ - return h_ () > n.h_ () ? 1 - : h_ () < n.h_ () ? 0 - : l_ () >= n.l_ (); -} - -ACE_INLINE bool -ACE_U_LongLong::operator>= (const ACE_UINT32 n) const -{ - return operator>= (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE -ACE_U_LongLong::ACE_U_LongLong (const ACE_U_LongLong &n) -{ - h_ () = n.h_ (); - l_ () = n.l_ (); -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator= (const ACE_U_LongLong &n) -{ - h_ () = n.h_ (); - l_ () = n.l_ (); - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator= (const ACE_INT32 &rhs) -{ - if (rhs >= 0) - { - l_ () = static_cast<ACE_UINT32> (rhs); - h_ () = 0; - } - else - { - // We do not handle the case where a negative 32 bit integer is - // assigned to this representation of a 64 bit unsigned integer. - // The "undefined behavior" behavior performed by this - // implementation is to simply set all bits to zero. - l_ () = 0; - h_ () = 0; - } - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator= (const ACE_UINT32 &rhs) -{ - l_ () = rhs; - h_ () = 0; - - return *this; -} - - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator+ (const ACE_U_LongLong &n) const -{ - ACE_U_LongLong ret (l_ () + n.l_ (), h_ () + n.h_ ()); - if (ret.l_ () < n.l_ ()) /* carry */ ++ret.h_ (); - - return ret; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator+ (const ACE_UINT32 n) const -{ - return operator+ (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator- (const ACE_U_LongLong &n) const -{ - ACE_U_LongLong ret (l_ () - n.l_ (), h_ () - n.h_ ()); - if (l_ () < n.l_ ()) /* borrow */ --ret.h_ (); - - return ret; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator- (const ACE_UINT32 n) const -{ - return operator- (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator<< (const u_int n) const -{ - const ACE_UINT32 carry_mask = l_ () >> (32 - n); - ACE_U_LongLong ret (n < 32 ? l_ () << n : 0, - n < 32 ? (h_ () << n) | carry_mask : carry_mask); - - return ret; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator<<= (const u_int n) -{ - const ACE_UINT32 carry_mask = l_ () >> (32 - n); - h_ () = n < 32 ? (h_ () << n) | carry_mask : carry_mask; - - // g++ 2.7.2.3/Solaris 2.5.1 doesn't modify l_ () if shifted by 32. - l_ () = n < 32 ? l_ () << n : 0; - - return *this; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator>> (const u_int n) const -{ - const ACE_UINT32 carry_mask = h_ () << (32 - n); - ACE_U_LongLong ret (n < 32 ? (l_ () >> n) | carry_mask : 0, - n < 32 ? h_ () >> n : 0); - - return ret; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator>>= (const u_int n) -{ - const ACE_UINT32 carry_mask = h_ () << (32 - n); - l_ () = n < 32 ? (l_ () >> n) | carry_mask : carry_mask; - h_ () = n < 32 ? h_ () >> n : 0; - - return *this; -} - -ACE_INLINE double -ACE_U_LongLong::operator/ (const double n) const -{ - // See the derivation above in operator/ (const ACE_UINT32). - - return ((double) 0xffffffffu - n + 1.0) / n * h_ () + - (double) h_ () + (double) l_ () / n; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator+= (const ACE_U_LongLong &n) -{ - h_ () += n.h_ (); - l_ () += n.l_ (); - if (l_ () < n.l_ ()) /* carry */ ++h_ (); - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator+= (const ACE_UINT32 n) -{ - return operator+= (static_cast<const ACE_U_LongLong> (n)); -} - -#define ACE_HIGHBIT (~(~0UL >> 1)) - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::ul_shift (ACE_UINT32 a, ACE_UINT32 c_in, ACE_UINT32 *c_out) const -{ - const ACE_UINT32 b = (a << 1) | c_in; - *c_out = (*c_out << 1) + ((a & ACE_HIGHBIT) > 0); - - return b; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::ull_shift (ACE_U_LongLong a, - ACE_UINT32 c_in, - ACE_UINT32 *c_out) const -{ - ACE_U_LongLong b; - - b.l_ () = (a.l_ () << 1) | c_in; - c_in = ((a.l_ () & ACE_HIGHBIT) > 0); - b.h_ () = (a.h_ () << 1) | c_in; - *c_out = (*c_out << 1) + ((a.h_ () & ACE_HIGHBIT) > 0); - - return b; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::ull_add (ACE_U_LongLong a, ACE_U_LongLong b, ACE_UINT32 *carry) const -{ - ACE_U_LongLong r (0, 0); - ACE_UINT32 c1, c2, c3, c4; - - c1 = a.l_ () % 2; - c2 = b.l_ () % 2; - c3 = 0; - - r.l_ () = a.l_ ()/2 + b.l_ ()/2 + (c1+c2)/2; - r.l_ () = ul_shift (r.l_ (), (c1+c2)%2, &c3); - - c1 = a.h_ () % 2; - c2 = b.h_ () % 2; - c4 = 0; - - r.h_ () = a.h_ ()/2 + b.h_ ()/2 + (c1+c2+c3)/2; - r.h_ () = ul_shift (r.h_ (), (c1+c2+c3)%2, &c4); - - *carry = c4; - - return r; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::ull_mult (ACE_U_LongLong a, ACE_UINT32 b, ACE_UINT32 *carry) const -{ - register ACE_UINT32 mask = ACE_HIGHBIT; - const ACE_U_LongLong zero (0, 0); - ACE_U_LongLong accum (0, 0); - ACE_UINT32 c; - - *carry = 0; - if (b > 0) - do - { - accum = ull_shift (accum, 0U, carry); - if (b & mask) - accum = ull_add (accum, a, &c); - else - accum = ull_add (accum, zero, &c); - *carry += c; - mask >>= 1; - } - while (mask > 0); - - return accum; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator* (const ACE_UINT32 n) const -{ - ACE_UINT32 carry; // will throw the carry away - - return ull_mult (*this, n, &carry); -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator*= (const ACE_UINT32 n) -{ - ACE_UINT32 carry; // will throw the carry away - - return *this = ull_mult (*this, n, &carry); -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator-= (const ACE_U_LongLong &n) -{ - h_ () -= n.h_ (); - if (l_ () < n.l_ ()) /* borrow */ --h_ (); - l_ () -= n.l_ (); - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator-= (const ACE_UINT32 n) -{ - return operator-= (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator++ () -{ - ++l_ (); - if (l_ () == 0) /* carry */ ++h_ (); - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator-- () -{ - if (l_ () == 0) /* borrow */ --h_ (); - --l_ (); - - return *this; -} - -ACE_INLINE const ACE_U_LongLong -ACE_U_LongLong::operator++ (int) -{ - // Post-increment operator should always be implemented in terms of - // the pre-increment operator to enforce consistent semantics. - ACE_U_LongLong temp (*this); - ++*this; - return temp; -} - -ACE_INLINE const ACE_U_LongLong -ACE_U_LongLong::operator-- (int) -{ - // Post-decrement operator should always be implemented in terms of - // the pre-decrement operator to enforce consistent semantics. - ACE_U_LongLong temp (*this); - --*this; - return temp; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator|= (const ACE_U_LongLong n) -{ - l_ () |= n.l_ (); - h_ () |= n.h_ (); - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator|= (const ACE_UINT32 n) -{ - return operator|= (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator&= (const ACE_U_LongLong n) -{ - l_ () &= n.l_ (); - h_ () &= n.h_ (); - - return *this; -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator&= (const ACE_UINT32 n) -{ - return operator&= (static_cast<const ACE_U_LongLong> (n)); -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const ACE_UINT32 n) const -{ - // This takes advantage of the fact that the return type has only 32 - // bits. Replace 0x100000000 with 0xffffffff + 1 because the former - // has 33 bits. - // Quotient = (0x100000000u * hi_ + lo_) / n - // = ((0x100000000u - n + n) * hi_ + lo_) / n - // = ((0x100000000u - n) / n * hi_ + hi_ * n / n + lo_ / n - // = (0x100000000u - n) / n * hi_ + hi_ + lo_ / n - // = (0xffffffffu - n + 1) / n * hi_ + hi_ + lo_ / n - - return (0xffffffffu - n + 1) / n * h_ () + h_ () + l_ () / n; -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator% (const ACE_UINT32 n) const -{ - // Because the argument is an ACE_UINT32, the result can never be - // bigger than 32 bits. Replace 0x100000000 with 0xffffffff + 1 - // because the former has 33 bits. - // Mod = (0x100000000u * hi_ + lo_) % n - // = (0x100000000u % n * hi_ + lo_ % n) % n - // = ((0x100000000u - n) % n * hi_ + lo_ % n) % n - // = ((0xffffffffu - n + 1) % n * hi_ + lo_ % n) % n - - return ((0xffffffff - n + 1) % n * h_ () + l_ () % n) % n; -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator| (const ACE_INT32 n) const -{ - return l_ () | n; -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator& (const ACE_INT32 n) const -{ - return l_ () & n; -} - -ACE_INLINE ACE_U_LongLong -ACE_U_LongLong::operator* (const ACE_INT32 n) const -{ - return operator* ((ACE_UINT32) n); -} - -ACE_INLINE ACE_U_LongLong & -ACE_U_LongLong::operator*= (const ACE_INT32 n) -{ - return operator*= ((ACE_UINT32) n); -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const ACE_INT32 n) const -{ - return operator/ ((ACE_UINT32) n); -} - -#if ACE_SIZEOF_INT == 4 -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const u_long n) const -{ - return operator/ ((ACE_UINT32) n); -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const long n) const -{ - return operator/ ((ACE_UINT32) n); -} - -#else /* ACE_SIZEOF_INT != 4 */ -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const u_int n) const -{ - return operator/ ((ACE_UINT32) n); -} - -ACE_INLINE ACE_UINT32 -ACE_U_LongLong::operator/ (const int n) const -{ - return operator/ ((ACE_UINT32) n); -} -#endif /* ACE_SIZEOF_INT != 4 */ - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_LACKS_LONGLONG_T || ACE_LACKS_UNSIGNEDLONGLONG_T */ diff --git a/ACE/ace/CDR_Base.h b/ACE/ace/CDR_Base.h index d7bd2937be8..5b6487d638a 100644 --- a/ACE/ace/CDR_Base.h +++ b/ACE/ace/CDR_Base.h @@ -213,7 +213,7 @@ public: typedef long LongLong; # elif defined(__TANDEM) typedef long long LongLong; -# elif ACE_SIZEOF_LONG_LONG == 8 && !defined (ACE_LACKS_LONGLONG_T) +# elif ACE_SIZEOF_LONG_LONG == 8 # if defined (sun) && !defined (ACE_LACKS_U_LONGLONG_T) // sun #defines u_longlong_t, maybe other platforms do also. // Use it, at least with g++, so that its -pedantic doesn't diff --git a/ACE/ace/Functor.h b/ACE/ace/Functor.h index cf8b4512c49..9374398e9b4 100644 --- a/ACE/ace/Functor.h +++ b/ACE/ace/Functor.h @@ -204,7 +204,7 @@ public: unsigned long operator () (unsigned long t) const; }; -#if !defined (ACE_LACKS_LONGLONG_T) && (ACE_SIZEOF_LONG < 8) +#if (ACE_SIZEOF_LONG < 8) /** * @brief Function object for hashing a signed 64-bit number */ @@ -215,10 +215,8 @@ public: /// Simply returns t unsigned long operator () (ACE_INT64 t) const; }; -#endif /* !ACE_LACKS_LONGLONG_T && ACE_SIZEOF_LONG < 8 */ +#endif /* ACE_SIZEOF_LONG < 8 */ -// We can do this even if ACE_LACKS_UNSIGNEDLONGLONG_T because there's an -// emulation for it in ACE_U_LongLong. #if (ACE_SIZEOF_LONG < 8) /** * @brief Function object for hashing an unsigned 64-bit number diff --git a/ACE/ace/Functor.inl b/ACE/ace/Functor.inl index 86d0f8f45a6..dc3de606948 100644 --- a/ACE/ace/Functor.inl +++ b/ACE/ace/Functor.inl @@ -108,13 +108,13 @@ ACE_Hash<unsigned long>::operator () (unsigned long t) const } // This #if needs to match the one in Functor.h -#if !defined (ACE_LACKS_LONGLONG_T) && (ACE_SIZEOF_LONG < 8) +#if (ACE_SIZEOF_LONG < 8) ACE_INLINE unsigned long ACE_Hash<ACE_INT64>::operator () (ACE_INT64 t) const { return static_cast<unsigned long> (t); } -#endif /* !ACE_LACKS_LONGLONG_T && ACE_SIZEOF_LONG < 8 */ +#endif /* ACE_SIZEOF_LONG < 8 */ #if (ACE_SIZEOF_LONG < 8) ACE_INLINE unsigned long diff --git a/ACE/ace/Handle_Set.cpp b/ACE/ace/Handle_Set.cpp index b99282bb7e8..cc2d9b10af7 100644 --- a/ACE/ace/Handle_Set.cpp +++ b/ACE/ace/Handle_Set.cpp @@ -224,24 +224,11 @@ ACE_Handle_Set::set_max (ACE_HANDLE current_max) maskp[i] == 0; i--) continue; -#if defined (ACE_TANDEM_NSK_BIT_ORDER) - // bits are in reverse order, MSB (sign bit) = bit 0. - this->max_handle_ = ACE_MULT_BY_WORDSIZE (i); - for (fd_mask val = maskp[i]; - (val & ACE_MSB_MASK) != 0; - val = (val << 1)) - ++this->max_handle_; -#elif 1 /* !defined(ACE_HAS_BIG_FD_SET) */ this->max_handle_ = ACE_MULT_BY_WORDSIZE (i); for (fd_mask val = maskp[i]; (val & ~1) != 0; // This obscure code is needed since "bit 0" is in location 1... val = (val >> 1) & ACE_MSB_MASK) ++this->max_handle_; -#else - register u_long val = this->mask_.fds_bits[i]; - this->max_handle_ = ACE_MULT_BY_WORDSIZE (i) - + ACE_Handle_Set::bitpos(val & ~(val - 1)); -#endif /* 1 */ } // Do some sanity checking... @@ -310,12 +297,7 @@ ACE_Handle_Set_Iterator::operator () (void) // Increment the iterator and advance to the next bit in this // word. this->handle_index_++; -#if defined (ACE_TANDEM_NSK_BIT_ORDER) - // bits are in reverse order, MSB (sign bit) = bit 0. - this->word_val_ = (this->word_val_ << 1); -# else this->word_val_ = (this->word_val_ >> 1) & ACE_MSB_MASK; -# endif /* ACE_TANDEM_NSK_BIT_ORDER */ // If we've examined all the bits in this word, we'll go onto // the next word. @@ -351,19 +333,10 @@ ACE_Handle_Set_Iterator::operator () (void) // bit enabled, keeping track of which <handle_index> this // represents (this information is used by subsequent calls to // <operator()>). - -#if defined (ACE_TANDEM_NSK_BIT_ORDER) - // bits are in reverse order, MSB (sign bit) = bit 0. - for (; - this->word_val_ > 0; - this->word_val_ = (this->word_val_ << 1)) - this->handle_index_++; -# else for (; ACE_BIT_DISABLED (this->word_val_, 1); this->handle_index_++) this->word_val_ = (this->word_val_ >> 1) & ACE_MSB_MASK; -# endif /* ACE_TANDEM_NSK_BIT_ORDER */ return result; } @@ -465,19 +438,11 @@ ACE_Handle_Set_Iterator::ACE_Handle_Set_Iterator (const ACE_Handle_Set &hs) // Loop until we get <word_val_> to have its least significant bit // enabled, keeping track of which <handle_index> this represents // (this information is used by <operator()>). -#if defined (ACE_TANDEM_NSK_BIT_ORDER) - // bits are in reverse order, MSB (sign bit) = bit 0. - for (this->word_val_ = maskp[this->word_num_]; - this->word_val_ > 0; - this->word_val_ = (this->word_val_ << 1)) - this->handle_index_++; -# else for (this->word_val_ = maskp[this->word_num_]; ACE_BIT_DISABLED (this->word_val_, 1) && this->handle_index_ < maxhandlep1; this->handle_index_++) this->word_val_ = (this->word_val_ >> 1) & ACE_MSB_MASK; -# endif /* ACE_TANDEM_NSK_BIT_ORDER */ #elif !defined (ACE_WIN32) && defined (ACE_HAS_BIG_FD_SET) if (this->word_max_==0) { @@ -493,7 +458,6 @@ ACE_Handle_Set_Iterator::ACE_Handle_Set_Iterator (const ACE_Handle_Set &hs) #endif /* !ACE_WIN32 && !ACE_HAS_BIG_FD_SET */ } - void ACE_Handle_Set_Iterator::reset_state (void) { @@ -533,19 +497,11 @@ ACE_Handle_Set_Iterator::reset_state (void) // Loop until we get <word_val_> to have its least significant bit // enabled, keeping track of which <handle_index> this represents // (this information is used by <operator()>). -#if defined (ACE_TANDEM_NSK_BIT_ORDER) - // bits are in reverse order, MSB (sign bit) = bit 0. - for (this->word_val_ = maskp[this->word_num_]; - this->word_val_ > 0; - this->word_val_ = (this->word_val_ << 1)) - this->handle_index_++; -# else for (this->word_val_ = maskp[this->word_num_]; ACE_BIT_DISABLED (this->word_val_, 1) && this->handle_index_ < maxhandlep1; this->handle_index_++) this->word_val_ = (this->word_val_ >> 1) & ACE_MSB_MASK; -# endif /* ACE_TANDEM_NSK_BIT_ORDER */ #elif !defined (ACE_WIN32) && defined (ACE_HAS_BIG_FD_SET) if (this->word_max_==0) { diff --git a/ACE/ace/High_Res_Timer.cpp b/ACE/ace/High_Res_Timer.cpp index 09034f25cff..343df20c630 100644 --- a/ACE/ace/High_Res_Timer.cpp +++ b/ACE/ace/High_Res_Timer.cpp @@ -305,17 +305,6 @@ ACE_High_Res_Timer::dump (void) const ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nglobal_scale_factor_: %u\n"), global_scale_factor ())); -#if defined (ACE_LACKS_LONGLONG_T) - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT (":\nstart_.hi (): %8x; start_.lo (): %8x;\n") - ACE_TEXT ("end_.hi (): %8x; end_.lo (): %8x;\n") - ACE_TEXT ("total_.hi (): %8x; total_.lo (): %8x;\n") - ACE_TEXT ("start_incr_.hi () %8x; start_incr_.lo (): %8x;\n"), - start_.hi (), start_.lo (), - end_.hi (), end_.lo (), - total_.hi (), total_.lo (), - start_incr_.hi (), start_incr_.lo ())); -#else /* ! ACE_LACKS_LONGLONG_T */ ACE_DEBUG ((LM_DEBUG, ACE_TEXT (":\nstart_.hi (): %8x; start_.lo (): %8x;\n") ACE_TEXT ("end_.hi (): %8x; end_.lo (): %8x;\n") @@ -329,7 +318,6 @@ ACE_High_Res_Timer::dump (void) const static_cast<ACE_UINT32> (total_ & 0xfffffffful), static_cast<ACE_UINT32> (start_incr_ >> 32), static_cast<ACE_UINT32> (start_incr_ & 0xfffffffful))); -#endif /* ! ACE_LACKS_LONGLONG_T */ ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); #endif /* ACE_HAS_DUMP */ } diff --git a/ACE/ace/Log_Msg.cpp b/ACE/ace/Log_Msg.cpp index 72499eccb0d..080b6e6c7ea 100644 --- a/ACE/ace/Log_Msg.cpp +++ b/ACE/ace/Log_Msg.cpp @@ -1730,15 +1730,6 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, ACE_hthread_t t_id; ACE_OS::thr_self (t_id); -# if defined (ACE_TANDEM_T1248_PTHREADS) - // tandem pthread_t is a struct... yuck. So use the ACE 5.0 - // code for it. - ACE_OS::strcpy (fp, ACE_TEXT ("u")); - if (can_check) - this_len = ACE_OS::snprintf (bp, bspace, format, t_id); - else - this_len = ACE_OS::sprintf (bp, format, t_id); -# else // Yes, this is an ugly C-style cast, but the correct // C++ cast is different depending on whether the t_id // is an integral type or a pointer type. FreeBSD uses @@ -1751,7 +1742,6 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, else this_len = ACE_OS::sprintf (bp, format, (unsigned long)t_id); -# endif /* ACE_TANDEM_T1248_PTHREADS */ #endif /* ACE_WIN32 */ ACE_UPDATE_COUNT (bspace, this_len); @@ -1978,21 +1968,6 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, break; case 'Q': -#if defined (ACE_LACKS_LONGLONG_T) || defined (ACE_LACKS_UNSIGNEDLONGLONG_T) - { - // This relies on the ACE_U_LongLong storage layout. - ACE_UINT32 hi = va_arg (argp, ACE_UINT32); - ACE_UINT32 lo = va_arg (argp, ACE_UINT32); - if (hi > 0) - this_len = ACE_OS::sprintf (bp, - "0x%lx%0*lx", - hi, - 2 * sizeof lo, - lo); - else - this_len = ACE_OS::sprintf (bp, "0x%lx", lo); - } -#else /* ! ACE_LACKS_LONGLONG_T */ { const ACE_TCHAR *fmt = ACE_UINT64_FORMAT_SPECIFIER; ACE_OS::strcpy (fp, &fmt[1]); // Skip leading % @@ -2005,15 +1980,10 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, format, va_arg (argp, ACE_UINT64)); } -#endif /* ! ACE_LACKS_LONGLONG_T || ACE_LACKS_UNSIGNEDLONGLONG_T */ ACE_UPDATE_COUNT (bspace, this_len); break; case 'q': - #if defined (ACE_LACKS_LONGLONG_T) - // No implementation available yet, no ACE_INT64 emulation - // available yet - #else /* ! ACE_LACKS_LONGLONG_T */ { const ACE_TCHAR *fmt = ACE_INT64_FORMAT_SPECIFIER; ACE_OS::strcpy (fp, &fmt[1]); // Skip leading % @@ -2026,7 +1996,6 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, format, va_arg (argp, ACE_INT64)); } - #endif /* ! ACE_LACKS_LONGLONG_T */ ACE_UPDATE_COUNT (bspace, this_len); break; diff --git a/ACE/ace/Numeric_Limits.h b/ACE/ace/Numeric_Limits.h index db9ec4abdf8..c817aaf9c6e 100644 --- a/ACE/ace/Numeric_Limits.h +++ b/ACE/ace/Numeric_Limits.h @@ -52,11 +52,6 @@ # undef max # endif /* __MINGW32__ */ -# if defined (ACE_LACKS_LONGLONG_T) || defined (ACE_LACKS_UNSIGNEDLONGLONG_T) -// For ACE_U_LongLong. -# include "ace/Basic_Types.h" -# endif /* ACE_LACKS_LONGLONG_T || ACE_LACKS_UNSIGNEDLONGLONG_T */ - # include <limits> #endif /* ACE_LACKS_NUMERIC_LIMITS */ @@ -112,34 +107,32 @@ struct ACE_Export ACE_Numeric_Limits<signed long> static signed long max (void) { return LONG_MAX; } }; -// #ifndef ACE_LACKS_LONGLONG_T -// template<> -// struct ACE_Export ACE_Numeric_Limits<signed long long> -// { -// #if defined (LLONG_MIN) -// # define ACE_LLONG_MIN LLONG_MIN -// #elif defined (LONG_LONG_MIN) -// # define ACE_LLONG_MIN LONG_LONG_MIN -// #elif defined (LONGLONG_MIN) -// # define ACE_LLONG_MIN LONGLONG_MIN -// #else -// # error Unable to determine minimum signed long long value. -// #endif /* LLONG_MIN */ - -// #if defined (LLONG_MAX) -// # define ACE_LLONG_MAX LLONG_MAX -// #elif defined (LONG_LONG_MAX) -// # define ACE_LLONG_MAX LONG_LONG_MAX -// #elif defined (LONGLONG_MAX) -// # define ACE_LLONG_MAX LONGLONG_MAX -// #else -// # error Unable to determine maximum signed long long value. -// #endif /* LLONG_MAX */ - -// static signed long long min (void) { return ACE_LLONG_MIN; } -// static signed long long max (void) { return ACE_LLONG_MAX; } -// }; -// #endif /* !ACE_LACKS_LONGLONG_T */ +template<> +struct ACE_Export ACE_Numeric_Limits<signed long long> +{ +#if defined (LLONG_MIN) +# define ACE_LLONG_MIN LLONG_MIN +#elif defined (LONG_LONG_MIN) +# define ACE_LLONG_MIN LONG_LONG_MIN +#elif defined (LONGLONG_MIN) +# define ACE_LLONG_MIN LONGLONG_MIN +#else +# error Unable to determine minimum signed long long value. +#endif /* LLONG_MIN */ + +#if defined (LLONG_MAX) +# define ACE_LLONG_MAX LLONG_MAX +#elif defined (LONG_LONG_MAX) +# define ACE_LLONG_MAX LONG_LONG_MAX +#elif defined (LONGLONG_MAX) +# define ACE_LLONG_MAX LONGLONG_MAX +#else +# error Unable to determine maximum signed long long value. +#endif /* LLONG_MAX */ + + static signed long long min (void) { return ACE_LLONG_MIN; } + static signed long long max (void) { return ACE_LLONG_MAX; } +}; // ------------------------------------------ // Unsigned integers @@ -171,23 +164,21 @@ struct ACE_Export ACE_Numeric_Limits<unsigned long> static unsigned long max (void) { return ULONG_MAX; } }; -// #ifndef ACE_LACKS_LONGLONG_T -// template<> -// struct ACE_Export ACE_Numeric_Limits<unsigned long long> -// { -// static unsigned long long min (void) { return 0; } -// static unsigned long long max (void) -// { -// # if defined (ULLONG_MAX) -// return ULLONG_MAX; -// # elif defined (ULONGLONG_MAX) -// return ULONGLONG_MAX; -// # else -// # error Unable to determine maximum unsigned long long value. -// # endif /* ULLONG_MAX */ -// } -// }; -// #endif /* !ACE_LACKS_LONGLONG_T */ +template<> +struct ACE_Export ACE_Numeric_Limits<unsigned long long> +{ + static unsigned long long min (void) { return 0; } + static unsigned long long max (void) + { +# if defined (ULLONG_MAX) + return ULLONG_MAX; +# elif defined (ULONGLONG_MAX) + return ULONGLONG_MAX; +# else +# error Unable to determine maximum unsigned long long value. +# endif /* ULLONG_MAX */ + } +}; // ------------------------------------------ // Floating point types @@ -254,15 +245,6 @@ struct ACE_Numeric_Limits<ULONGLONG> #endif /* ACE_LACKS_NUMERIC_LIMITS */ -#if defined (ACE_LACKS_LONGLONG_T) || defined (ACE_LACKS_UNSIGNEDLONGLONG_T) -template<> -struct ACE_Numeric_Limits<ACE_U_LongLong> -{ - static ACE_U_LongLong min (void) { return ACE_U_LongLong (); /* 0 */ } - static ACE_U_LongLong max (void) { return ACE_UINT64_MAX; } -}; -#endif /* ACE_LACKS_LONGLONG_T || defined ACE_LACKS_UNSIGNEDLONGLONG_T */ - ACE_END_VERSIONED_NAMESPACE_DECL #include /**/ "ace/post.h" diff --git a/ACE/ace/OS_NS_Thread.cpp b/ACE/ace/OS_NS_Thread.cpp index 7380b84e522..540c738ccd7 100644 --- a/ACE/ace/OS_NS_Thread.cpp +++ b/ACE/ace/OS_NS_Thread.cpp @@ -61,12 +61,6 @@ ACE_Thread_ID::to_string (char *thr_string) const format, static_cast <unsigned> (this->thread_id_)); #else -# if defined (ACE_TANDEM_T1248_PTHREADS) - // Tandem pthread_t is a struct... yuck. So use the ACE 5.0 - // code for it. - ACE_OS::strcpy (fp, "u"); - ACE_OS::sprintf (thr_string, format, thread_handle_); -# else // Yes, this is an ugly C-style cast, but the // correct C++ cast is different depending on // whether the t_id is an integral type or a pointer @@ -77,7 +71,6 @@ ACE_Thread_ID::to_string (char *thr_string) const ACE_OS::sprintf (thr_string, format, (unsigned long) thread_handle_); -# endif /* ACE_TANDEM_T1248_PTHREADS */ #endif /* ACE_WIN32 */ } @@ -3510,7 +3503,7 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params, #if defined (ACE_HAS_STHREADS) return ACE_OS::set_scheduling_params (sched_params, id); #elif defined (ACE_HAS_PTHREADS) && \ - (!defined (ACE_LACKS_SETSCHED) || defined (ACE_TANDEM_T1248_PTHREADS) || \ + (!defined (ACE_LACKS_SETSCHED) || \ defined (ACE_HAS_PTHREAD_SCHEDPARAM)) if (sched_params.quantum () != ACE_Time_Value::zero) { @@ -3529,15 +3522,15 @@ ACE_OS::sched_params (const ACE_Sched_Params &sched_params, if (sched_params.scope () == ACE_SCOPE_PROCESS) { -# if defined(ACE_TANDEM_T1248_PTHREADS) || defined (ACE_HAS_PTHREAD_SCHEDPARAM) +# if defined (ACE_HAS_PTHREAD_SCHEDPARAM) ACE_UNUSED_ARG (id); ACE_NOTSUP_RETURN (-1); -# else /* ! ACE_TANDEM_T1248_PTHREADS */ +# else /* !ACE_HAS_PTHREAD_SCHEDPARAM */ int result = ::sched_setscheduler (id == ACE_SELF ? 0 : id, sched_params.policy (), ¶m) == -1 ? -1 : 0; return result; -# endif /* ! ACE_TANDEM_T1248_PTHREADS */ +# endif /* !ACE_HAS_PTHREAD_SCHEDPARAM */ } else if (sched_params.scope () == ACE_SCOPE_THREAD) { diff --git a/ACE/ace/OS_NS_Thread.inl b/ACE/ace/OS_NS_Thread.inl index 186874c9224..b1a7a566d26 100644 --- a/ACE/ace/OS_NS_Thread.inl +++ b/ACE/ace/OS_NS_Thread.inl @@ -2511,10 +2511,7 @@ ACE_OS::sigwait (sigset_t *sset, int *sig) // Cygwin has sigwait definition, but it is not implemented ACE_UNUSED_ARG (sset); ACE_NOTSUP_RETURN (-1); -# elif defined (ACE_TANDEM_T1248_PTHREADS) - errno = ::spt_sigwait (sset, sig); - return errno == 0 ? *sig : -1; -# else /* this is draft 7 or std */ +# else /* this is std */ errno = ::sigwait (sset, sig); return errno == 0 ? *sig : -1; # endif /* CYGWIN32 */ diff --git a/ACE/ace/OS_NS_stdlib.inl b/ACE/ace/OS_NS_stdlib.inl index 1dd97e34a71..1281440caab 100644 --- a/ACE/ace/OS_NS_stdlib.inl +++ b/ACE/ace/OS_NS_stdlib.inl @@ -591,8 +591,6 @@ ACE_OS::system (const ACE_TCHAR *s) ACE_NOTSUP_RETURN (-1); #elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR) ACE_OSCALL_RETURN (::_wsystem (s), int, -1); -#elif defined (ACE_TANDEM_T1248_PTHREADS) - ACE_OSCALL_RETURN (::spt_system (s), int, -1); #else ACE_OSCALL_RETURN (::system (ACE_TEXT_ALWAYS_CHAR (s)), int, -1); #endif /* ACE_LACKS_SYSTEM */ diff --git a/ACE/ace/OS_NS_sys_select.inl b/ACE/ace/OS_NS_sys_select.inl index d905837d992..7c75b476ccc 100644 --- a/ACE/ace/OS_NS_sys_select.inl +++ b/ACE/ace/OS_NS_sys_select.inl @@ -38,9 +38,6 @@ ACE_OS::select (int width, ACE_UNUSED_ARG (efds); ACE_UNUSED_ARG (timeout); ACE_NOTSUP_RETURN (-1); -#elif defined(ACE_TANDEM_T1248_PTHREADS) - ACE_SOCKCALL_RETURN (::spt_select (width, rfds, wfds, efds, timep), - int, -1); #else ACE_SOCKCALL_RETURN (::select (width, rfds, wfds, efds, timep), int, -1); @@ -67,9 +64,6 @@ ACE_OS::select (int width, ACE_UNUSED_ARG (efds); ACE_UNUSED_ARG (timeout); ACE_NOTSUP_RETURN (-1); -#elif defined(ACE_TANDEM_T1248_PTHREADS) - ACE_SOCKCALL_RETURN (::spt_select (width, rfds, wfds, efds, ___ACE_TIMEOUT), - int, -1); #else ACE_SOCKCALL_RETURN (::select (width, rfds, wfds, efds, ___ACE_TIMEOUT), int, -1); diff --git a/ACE/ace/OS_NS_sys_wait.inl b/ACE/ace/OS_NS_sys_wait.inl index 969a9b7a5fc..02ecc734717 100644 --- a/ACE/ace/OS_NS_sys_wait.inl +++ b/ACE/ace/OS_NS_sys_wait.inl @@ -76,10 +76,6 @@ ACE_OS::waitpid (pid_t pid, if (handle == 0) ::CloseHandle (phandle); return result; -#elif defined(ACE_TANDEM_T1248_PTHREADS) - ACE_UNUSED_ARG (handle); - ACE_OSCALL_RETURN (::spt_waitpid (pid, status, wait_options), - pid_t, -1); #else ACE_UNUSED_ARG (handle); ACE_OSCALL_RETURN (::waitpid (pid, status, wait_options), diff --git a/ACE/ace/OS_NS_time.h b/ACE/ace/OS_NS_time.h index b2dde7c8981..aeb820f9585 100644 --- a/ACE/ace/OS_NS_time.h +++ b/ACE/ace/OS_NS_time.h @@ -133,12 +133,12 @@ inline DWORD ACE_HIGH_DWORD (ACE_QWORD q) { return (DWORD) (q >> 32); } # elif defined (_TNS_R_TARGET) typedef long long ACE_hrtime_t; # else /* !ACE_WIN32 */ -# if defined (ACE_HAS_HI_RES_TIMER) && !defined (ACE_LACKS_LONGLONG_T) +# if defined (ACE_HAS_HI_RES_TIMER) /* hrtime_t is defined on systems (Suns) with ACE_HAS_HI_RES_TIMER */ typedef hrtime_t ACE_hrtime_t; -# else /* ! ACE_HAS_HI_RES_TIMER || ACE_LACKS_LONGLONG_T */ +# else /* ! ACE_HAS_HI_RES_TIMER */ typedef ACE_UINT64 ACE_hrtime_t; -# endif /* ! ACE_HAS_HI_RES_TIMER || ACE_LACKS_LONGLONG_T */ +# endif /* ! ACE_HAS_HI_RES_TIMER */ # endif /* ACE_WIN32 */ # if defined (ACE_LACKS_UNSIGNEDLONGLONG_T) diff --git a/ACE/ace/OS_NS_time.inl b/ACE/ace/OS_NS_time.inl index 9a668cc0c34..98ee54d8c40 100644 --- a/ACE/ace/OS_NS_time.inl +++ b/ACE/ace/OS_NS_time.inl @@ -270,24 +270,14 @@ ACE_OS::gethrtime (const ACE_HRTimer_Op op) ::QueryPerformanceCounter (&freq); -# if defined (ACE_LACKS_LONGLONG_T) - ACE_UINT64 uint64_freq (freq.u.LowPart, - static_cast<unsigned int> (freq.u.HighPart)); - return uint64_freq; -# else return freq.QuadPart; -# endif //ACE_LACKS_LONGLONG_T #elif defined (ghs) && defined (ACE_HAS_PENTIUM) ACE_UNUSED_ARG (op); // Use .obj/gethrtime.o, which was compiled with g++. return ACE_GETHRTIME_NAME (); #elif (defined (__GNUG__) || defined (__INTEL_COMPILER)) && !defined(ACE_VXWORKS) && defined (ACE_HAS_PENTIUM) ACE_UNUSED_ARG (op); -# if defined (ACE_LACKS_LONGLONG_T) - double now; -# else /* ! ACE_LACKS_LONGLONG_T */ ACE_hrtime_t now; -# endif /* ! ACE_LACKS_LONGLONG_T */ #if defined (__amd64__) || defined (__x86_64__) // Read the high res tick counter into 32 bit int variables "eax" and @@ -301,17 +291,7 @@ ACE_OS::gethrtime (const ACE_HRTimer_Op op) asm volatile ("rdtsc" : "=A" (now) : : "memory"); #endif -# if defined (ACE_LACKS_LONGLONG_T) - ACE_UINT32 least, most; - ACE_OS::memcpy (&least, &now, sizeof (ACE_UINT32)); - ACE_OS::memcpy (&most, (u_char *) &now + sizeof (ACE_UINT32), - sizeof (ACE_UINT32)); - - ACE_hrtime_t ret (least, most); - return ret; -# else /* ! ACE_LACKS_LONGLONG_T */ return now; -# endif /* ! ACE_LACKS_LONGLONG_T */ #elif defined (ACE_LINUX) && defined (ACE_HAS_ALPHA_TIMER) // NOTE: alphas only have a 32 bit tick (cycle) counter. The rpcc // instruction actually reads 64 bits, but the high 32 bits are @@ -348,11 +328,7 @@ ACE_OS::gethrtime (const ACE_HRTimer_Op op) } while (most != scratch); #endif -#if defined (ACE_LACKS_LONGLONG_T) - return ACE_U_LongLong (least, most); -#else /* ! ACE_LACKS_LONGLONG_T */ return 0x100000000llu * most + least; -#endif /* ! ACE_LACKS_LONGLONG_T */ #elif defined (ACE_HAS_CLOCK_GETTIME) // e.g., VxWorks (besides POWERPC && GreenHills) . . . diff --git a/ACE/ace/OS_NS_unistd.inl b/ACE/ace/OS_NS_unistd.inl index 4e1fb55df4c..978f5e18b4c 100644 --- a/ACE/ace/OS_NS_unistd.inl +++ b/ACE/ace/OS_NS_unistd.inl @@ -955,13 +955,9 @@ ACE_OS::sleep (const ACE_Time_Value &tv) // Copy the timeval, because this platform doesn't declare the timeval // as a pointer to const. timeval tv_copy = tv; -# if defined(ACE_TANDEM_T1248_PTHREADS) - ACE_OSCALL_RETURN (::spt_select (0, 0, 0, 0, &tv_copy), int, -1); -# else - //FUZZ: disable check_for_lack_ACE_OS - ACE_OSCALL_RETURN (::select (0, 0, 0, 0, &tv_copy), int, -1); - //FUZZ: enable check_for_lack_ACE_OS -# endif + //FUZZ: disable check_for_lack_ACE_OS + ACE_OSCALL_RETURN (::select (0, 0, 0, 0, &tv_copy), int, -1); + //FUZZ: enable check_for_lack_ACE_OS # else /* ! ACE_HAS_NONCONST_SELECT_TIMEVAL */ const timeval *tvp = tv; //FUZZ: disable check_for_lack_ACE_OS diff --git a/ACE/ace/Profile_Timer.cpp b/ACE/ace/Profile_Timer.cpp index 5347982e782..2afafa3ef25 100644 --- a/ACE/ace/Profile_Timer.cpp +++ b/ACE/ace/Profile_Timer.cpp @@ -308,11 +308,7 @@ ACE_Profile_Timer::elapsed_time (ACE_Elapsed_Time &et) ACE_hrtime_t delta_t; // nanoseconds timer_.elapsed_time (delta_t); -# 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 /* 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/ace/Sched_Params.cpp b/ACE/ace/Sched_Params.cpp index 80a89a1abc1..ab2fb1212be 100644 --- a/ACE/ace/Sched_Params.cpp +++ b/ACE/ace/Sched_Params.cpp @@ -84,9 +84,7 @@ ACE_Sched_Params::priority_min (const Policy policy, } } #elif defined(ACE_HAS_PTHREADS) && \ - (!defined(ACE_LACKS_SETSCHED) || defined (ACE_TANDEM_T1248_PTHREADS) || \ - defined (ACE_HAS_PTHREAD_SCHEDPARAM)) - + (!defined(ACE_LACKS_SETSCHED)) switch (scope) { case ACE_SCOPE_THREAD: @@ -192,7 +190,7 @@ ACE_Sched_Params::priority_max (const Policy policy, } } #elif defined(ACE_HAS_PTHREADS) && \ - (!defined(ACE_LACKS_SETSCHED) || defined (ACE_TANDEM_T1248_PTHREADS) || \ + (!defined(ACE_LACKS_SETSCHED) || \ defined (ACE_HAS_PTHREAD_SCHEDPARAM)) switch (scope) @@ -274,7 +272,7 @@ ACE_Sched_Params::next_priority (const Policy policy, return priority; // unknown priority: should never get here } #elif defined(ACE_HAS_THREADS) && \ - (!defined(ACE_LACKS_SETSCHED) || defined (ACE_TANDEM_T1248_PTHREADS) || \ + (!defined(ACE_LACKS_SETSCHED) || \ defined (ACE_HAS_PTHREAD_SCHEDPARAM)) // including STHREADS, and PTHREADS int const max = priority_max (policy, scope); @@ -318,7 +316,7 @@ ACE_Sched_Params::previous_priority (const Policy policy, return priority; // unknown priority: should never get here } #elif defined(ACE_HAS_THREADS) && \ - (!defined(ACE_LACKS_SETSCHED) || defined (ACE_TANDEM_T1248_PTHREADS) || \ + (!defined(ACE_LACKS_SETSCHED) || \ defined (ACE_HAS_PTHREAD_SCHEDPARAM)) // including STHREADS and PTHREADS int const min = priority_min (policy, scope); diff --git a/ACE/ace/Stats.cpp b/ACE/ace/Stats.cpp index 5339a1a7726..3763b9e2632 100644 --- a/ACE/ace/Stats.cpp +++ b/ACE/ace/Stats.cpp @@ -68,15 +68,8 @@ ACE_Stats::mean (ACE_Stats_Value &m, { if (number_of_samples_ > 0) { -#if defined ACE_LACKS_LONGLONG_T - // If ACE_LACKS_LONGLONG_T, then ACE_UINT64 is a user-defined class. - // To prevent having to construct a static of that class, declare it - // on the stack, and construct it, in each function that needs it. - const ACE_U_LongLong ACE_STATS_INTERNAL_OFFSET (0, 8); -#else /* ! ACE_LACKS_LONGLONG_T */ const ACE_UINT64 ACE_STATS_INTERNAL_OFFSET = ACE_UINT64_LITERAL (0x100000000); -#endif /* ! ACE_LACKS_LONGLONG_T */ ACE_UINT64 sum = ACE_STATS_INTERNAL_OFFSET; ACE_Unbounded_Queue_Iterator<ACE_INT32> i (samples_); diff --git a/ACE/ace/Task.cpp b/ACE/ace/Task.cpp index 3008b782206..f850abd20d7 100644 --- a/ACE/ace/Task.cpp +++ b/ACE/ace/Task.cpp @@ -15,21 +15,15 @@ ACE_Task_Base::ACE_Task_Base (ACE_Thread_Manager *thr_man) thr_mgr_ (thr_man), flags_ (0), grp_id_ (-1) -#if !defined(ACE_TANDEM_T1248_PTHREADS) ,last_thread_id_ (0) -#endif /* !defined (ACE_TANDEM_T1248_PTHREADS) */ { -#if defined(ACE_TANDEM_T1248_PTHREADS) - ACE_OS::memset( &this->last_thread_id_, '\0', sizeof( this->last_thread_id_ )); -#endif /* defined (ACE_TANDEM_T1248_PTHREADS) */ } ACE_Task_Base::~ACE_Task_Base (void) { } -// Default ACE_Task service routine - +/// Default ACE_Task service routine int ACE_Task_Base::svc (void) { @@ -37,8 +31,7 @@ ACE_Task_Base::svc (void) return 0; } -// Default ACE_Task open routine - +/// Default ACE_Task open routine int ACE_Task_Base::open (void *) { @@ -46,8 +39,7 @@ ACE_Task_Base::open (void *) return 0; } -// Default ACE_Task close routine - +/// Default ACE_Task close routine int ACE_Task_Base::close (u_long) { @@ -55,17 +47,15 @@ ACE_Task_Base::close (u_long) return 0; } -// Forward the call to close() so that existing applications don't -// break. - +/// Forward the call to close() so that existing applications don't +/// break. int ACE_Task_Base::module_closed (void) { return this->close (1); } -// Default ACE_Task put routine. - +/// Default ACE_Task put routine. int ACE_Task_Base::put (ACE_Message_Block *, ACE_Time_Value *) { @@ -73,8 +63,7 @@ ACE_Task_Base::put (ACE_Message_Block *, ACE_Time_Value *) return 0; } -// Wait for all threads running in a task to exit. - +/// Wait for all threads running in a task to exit. int ACE_Task_Base::wait (void) { @@ -88,7 +77,7 @@ ACE_Task_Base::wait (void) return 0; } -// Suspend a task. +/// Suspend a task. int ACE_Task_Base::suspend (void) { @@ -100,7 +89,7 @@ ACE_Task_Base::suspend (void) return 0; } -// Resume a suspended task. +/// Resume a suspended task. int ACE_Task_Base::resume (void) { diff --git a/ACE/ace/Throughput_Stats.cpp b/ACE/ace/Throughput_Stats.cpp index b49afec15e4..9753c0c2481 100644 --- a/ACE/ace/Throughput_Stats.cpp +++ b/ACE/ace/Throughput_Stats.cpp @@ -73,14 +73,7 @@ ACE_Throughput_Stats::dump_throughput (const ACE_TCHAR *msg, { #ifndef ACE_NLOGGING double seconds = -# if defined ACE_LACKS_LONGLONG_T - elapsed_time / sf; -#elif defined (ACE_LACKS_UNSIGNEDLONGLONG_T) - static_cast<double> (ACE_UINT64_DBLCAST_ADAPTER ( - ACE_U_LongLong(elapsed_time / sf))); -# else /* ! ACE_LACKS_LONGLONG_T */ static_cast<double> (ACE_UINT64_DBLCAST_ADAPTER (elapsed_time / sf)); -# endif /* ! ACE_LACKS_LONGLONG_T */ seconds /= ACE_HR_SCALE_CONVERSION; const double t_avg = samples_count / seconds; diff --git a/ACE/ace/Time_Value.h b/ACE/ace/Time_Value.h index 9a7fd5408b6..a0f76dfefed 100644 --- a/ACE/ace/Time_Value.h +++ b/ACE/ace/Time_Value.h @@ -35,17 +35,7 @@ suseconds_t const ACE_ONE_SECOND_IN_USECS = 1000000; // needed to determine if iostreams are present #include "ace/iosfwd.h" -// This forward declaration is needed by the set() and FILETIME() functions -#if defined (ACE_LACKS_LONGLONG_T) ACE_BEGIN_VERSIONED_NAMESPACE_DECL -class ACE_Export ACE_U_LongLong; -ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_LACKS_LONGLONG_T */ - -// ------------------------------------------------------------------- - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - /** * @class ACE_Time_Value diff --git a/ACE/ace/Time_Value.inl b/ACE/ace/Time_Value.inl index 984ffc6f7c2..e9db8764fa3 100644 --- a/ACE/ace/Time_Value.inl +++ b/ACE/ace/Time_Value.inl @@ -210,15 +210,7 @@ ACE_INLINE void ACE_Time_Value::to_usec (ACE_UINT64 & usec) const { // ACE_OS_TRACE ("ACE_Time_Value::to_usec"); - -#if defined (ACE_LACKS_UNSIGNEDLONGLONG_T) - usec = ACE_U_LongLong (static_cast<long long> (this->tv_.tv_sec)); -#elif defined (ACE_LACKS_LONGLONG_T) - // No native 64-bit type, meaning time_t is most likely 32 bits. - usec = ACE_U_LongLong (this->tv_.tv_sec); -#else usec = static_cast<ACE_UINT64> (this->tv_.tv_sec); -#endif /* ACE_LACKS_LONGLONG_T */ usec *= 1000000; usec += this->tv_.tv_usec; } diff --git a/ACE/ace/Truncate.h b/ACE/ace/Truncate.h index 5e1bb7545da..b6a523d73d8 100644 --- a/ACE/ace/Truncate.h +++ b/ACE/ace/Truncate.h @@ -27,10 +27,6 @@ #include "ace/If_Then_Else.h" #include "ace/Numeric_Limits.h" -#if defined (ACE_LACKS_LONGLONG_T) -# include "ace/Basic_Types.h" -#endif /* ACE_LACKS_LONGLONG_T */ - ACE_BEGIN_VERSIONED_NAMESPACE_DECL namespace ACE_Utils @@ -42,30 +38,24 @@ namespace ACE_Utils template<> struct Sign_Check<unsigned short> { ACE_STATIC_CONSTANT (bool, is_signed = 0); }; template<> struct Sign_Check<unsigned int> { ACE_STATIC_CONSTANT (bool, is_signed = 0); }; template<> struct Sign_Check<unsigned long> { ACE_STATIC_CONSTANT (bool, is_signed = 0); }; -#if !(defined(ACE_LACKS_LONGLONG_T) || defined(ACE_LACKS_UNSIGNEDLONGLONG_T)) # ifdef __GNUC__ // Silence g++ "-pedantic" warnings regarding use of "long long" // type. __extension__ # endif /* __GNUC__ */ template<> struct Sign_Check<unsigned long long> { ACE_STATIC_CONSTANT (bool, is_signed = 0); }; -#else - template<> struct Sign_Check<ACE_U_LongLong> { ACE_STATIC_CONSTANT (bool, is_signed = 0); }; -#endif /* !ACE_LACKS_LONGLONG_T */ // Specialize the signed cases. template<> struct Sign_Check<signed char> { ACE_STATIC_CONSTANT (bool, is_signed = 1); }; template<> struct Sign_Check<signed short> { ACE_STATIC_CONSTANT (bool, is_signed = 1); }; template<> struct Sign_Check<signed int> { ACE_STATIC_CONSTANT (bool, is_signed = 1); }; template<> struct Sign_Check<signed long> { ACE_STATIC_CONSTANT (bool, is_signed = 1); }; -#ifndef ACE_LACKS_LONGLONG_T # ifdef __GNUC__ // Silence g++ "-pedantic" warnings regarding use of "long long" // type. __extension__ # endif /* __GNUC__ */ template<> struct Sign_Check<signed long long> { ACE_STATIC_CONSTANT (bool, is_signed = 1); }; -#endif /* !ACE_LACKS_LONGLONG_T */ // ----------------------------------------------------- @@ -110,7 +100,6 @@ namespace ACE_Utils unsigned_type operator() (unsigned_type x) { return x; } }; -#if !(defined(ACE_LACKS_LONGLONG_T) || defined(ACE_LACKS_UNSIGNEDLONGLONG_T)) # ifdef __GNUC__ // Silence g++ "-pedantic" warnings regarding use of "long long" // type. @@ -123,15 +112,6 @@ namespace ACE_Utils unsigned_type operator() (unsigned_type x) { return x; } }; -#else - template<> - struct To_Unsigned<ACE_U_LongLong> - { - typedef ACE_U_LongLong unsigned_type; - - unsigned_type operator() (unsigned_type x) { return x; } - }; -#endif /* !ACE_LACKS_LONGLONG_T */ // ---------------- @@ -183,7 +163,6 @@ namespace ACE_Utils } }; -#if !(defined(ACE_LACKS_LONGLONG_T) || defined(ACE_LACKS_UNSIGNEDLONGLONG_T)) # ifdef __GNUC__ // Silence g++ "-pedantic" warnings regarding use of "long long" // type. @@ -200,7 +179,6 @@ namespace ACE_Utils return static_cast<unsigned_type> (x); } }; -#endif /* !ACE_LACKS_LONGLONG_T */ // ----------------------------------------------------- @@ -439,28 +417,6 @@ namespace ACE_Utils }; -#if defined (ACE_LACKS_LONGLONG_T) || defined (ACE_LACKS_UNSIGNEDLONGLONG_T) - // Partial specialization for the case where we're casting from - // ACE_U_LongLong to a smaller integer. We assume that we're always - // truncating from ACE_U_LongLong to a smaller type. The partial - // specialization above handles the case where both the FROM and TO - // types are ACE_U_LongLong. - template<typename TO> - struct Truncator<ACE_U_LongLong, TO> - { - TO operator() (ACE_U_LongLong const & val) - { - // If val less than or equal to ACE_Numeric_Limits<TO>::max(), - // val.lo() must be less than or equal to - // ACE_Numeric_Limits<TO>::max (), as well. - return - (val > ACE_Numeric_Limits<TO>::max () - ? ACE_Numeric_Limits<TO>::max () - : static_cast<TO> (val.lo ())); - } - }; -#endif /* ACE_LACKS_LONGLONG_T || ACE_LACKS_UNSIGNEDLONGLONG_T */ - // ----------------------------------------------------- /** * @struct Noop_Truncator diff --git a/ACE/ace/UUID.cpp b/ACE/ace/UUID.cpp index d9f537d7088..09285e7f523 100644 --- a/ACE/ace/UUID.cpp +++ b/ACE/ace/UUID.cpp @@ -460,13 +460,7 @@ namespace ACE_Utils UUID_Generator::get_systemtime (UUID_Time & timestamp) { const UUID_Time timeOffset = -#if defined (ACE_LACKS_UNSIGNEDLONGLONG_T) - ACE_U_LongLong (ACE_INT64_LITERAL (0x1B21DD213814000)); -#elif defined (ACE_LACKS_LONGLONG_T) - ACE_U_LongLong (0x13814000u, 0x1B21DD2u); -#else ACE_UINT64_LITERAL (0x1B21DD213814000); -#endif /* ACE_LACKS_UNSIGNEDLONGLONG_T */ /// Get the time of day, convert to 100ns ticks then add the offset. ACE_Time_Value now = ACE_OS::gettimeofday (); diff --git a/ACE/ace/config-tandem-nsk-mips-v2.h b/ACE/ace/config-tandem-nsk-mips-v2.h deleted file mode 100644 index 48f1107c86b..00000000000 --- a/ACE/ace/config-tandem-nsk-mips-v2.h +++ /dev/null @@ -1,384 +0,0 @@ -// -*- C++ -*- -// -// $Id$ - -#ifndef ACE_CONFIG_NSK_H -#define ACE_CONFIG_NSK_H - -#include /**/ "ace/pre.h" - -// The following configuration file contains defines for Tandem NSK -// platform, MIPS processor, version 2 C++ compiler. - - -//========================================================================= -// Tandem NSK specific parts -//========================================================================= - - -// Disable pthread renaming of symbols such as "open" and "close" -#define _CMA_NOWRAPPERS_ 1 - -// Get Handle_Set.cpp to generate correct bit operations for NSK platform -#define ACE_TANDEM_NSK_BIT_ORDER - -// Use facilities provided by T1248 version of pthreads. -// (If not defined, will use old version of pthreads.) -#define ACE_TANDEM_T1248_PTHREADS - -// Use all available T1248 thread aware wrapper functions for providing -// non-blocking I/O. -// [@note this causes a significant performance degradation] -//#define ACE_TANDEM_T1248_PTHREADS_ALL_IO_WRAPPERS - - -// Need this include here because some symbols defined by pthreads -// (e.g. timespec_t) are needed before spthread.h is normally included -// by ACE -#ifdef ACE_TANDEM_T1248_PTHREADS -#include <spthread.h> -#else -#include "pthread.h" -#include "dce/cma_dispatch_coop.h" -#endif - -// The following #defines are hacks to get around things -// that seem to be missing or different in Tandem land -#define NSIG 32 // missing from Signal.h - // note: on nsk TNS/R there is room in - // sigset_t for 128 signals but those - // above 31 are not valid. -#define MAXNAMLEN 248 // missing from dirent.h -#define ERRMAX 4218 // from errno.h - -// Following seems to be missing from G06.20 version of standard -// pthreads includes (it appeared in older version of standard pthreads) -// (SCHED_FIFO (aka cma_c_sched_fifo) used in Dynamic_Priority_Test) -#ifdef ACE_TANDEM_T1248_PTHREADS -typedef enum CMA_T_SCHED_POLICY { - cma_c_sched_fifo = 0, - cma_c_sched_rr = 1, - cma_c_sched_throughput = 2, - cma_c_sched_background = 3, - cma_c_sched_ada_low = 4 - } cma_t_sched_policy; -#endif - -// T1248 doesn't define these constants. They're defined in spt/cma.h -// (formerly dce/cma.h), but this header is not included or provided -// by T1248 G07-AAL. -#define cma_c_prio_fifo_min 16 -#define cma_c_prio_fifo_mid 24 -#define cma_c_prio_fifo_max 31 -#define cma_c_prio_rr_min 16 -#define cma_c_prio_rr_mid 24 -#define cma_c_prio_rr_max 31 -#define cma_c_prio_through_min 8 -#define cma_c_prio_through_mid 12 -#define cma_c_prio_through_max 15 -#define cma_c_prio_back_min 1 -#define cma_c_prio_back_mid 4 -#define cma_c_prio_back_max 7 - -// Enable NSK Pluggable Protocols -#define TAO_HAS_NSKPW 1 -#define TAO_HAS_NSKFS 1 - -//========================================================================= -// Platform specific parts -//========================================================================= - -// Platform lacks getpwnam_r() methods (e.g., SGI 6.2). -#define ACE_LACKS_PWD_REENTRANT_FUNCTIONS - -// Platform/compiler lacks {get,set}rlimit() function -#define ACE_LACKS_RLIMIT - -// The platform doesn't have mmap(2) -#define ACE_LACKS_MMAP - -// Platform lacks streambuf "linebuffered ()". [C++ iostream] -#define ACE_LACKS_LINEBUFFERED_STREAMBUF - -// Platform supports recvmsg and sendmsg -#define ACE_HAS_MSG - -// Platform defines ACE_HAS_MSG, but lacks msg_accrights{,len}. -#define ACE_LACKS_MSG_ACCRIGHTS - -// Platform supports sigsuspend() -#define ACE_HAS_SIGSUSPEND - -// Platform/compiler has the sigwait(2) prototype -#define ACE_HAS_SIGWAIT - -// Compiler/platform defines the sig_atomic_t typedef -#define ACE_HAS_SIG_ATOMIC_T - -// OS/compiler uses size_t * rather than int * for socket lengths -#define ACE_HAS_SIZET_SOCKET_LEN - -// OS/compiler uses void * arg 4 setsockopt() rather than const char * -#define ACE_HAS_VOIDPTR_SOCKOPT - -// The platform doesn't have mprotect(2) -#define ACE_LACKS_MPROTECT - -// Platform lacks msync() -#define ACE_LACKS_MSYNC - -// Platform does not support reentrant netdb functions (getprotobyname_r, -// getprotobynumber_r, gethostbyaddr_r, gethostbyname_r, getservbyname_r). -#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS Platform does not support - -// Platform lacks madvise() -#define ACE_LACKS_MADVISE - -// Platform lacks pri_t -#define ACE_LACKS_PRI_T - -// Platform lacks a working sbrk() -#define ACE_LACKS_SBRK - -// Platform doesn't have syscall() prototype -#define ACE_LACKS_SYSCALL - -// Platform lacks the inet_aton() function. -#define ACE_LACKS_INET_ATON - -// Compiler/platform has Dirent iterator functions -#define ACE_HAS_DIRENT - -// Platform uses ACE_HAS_DIRENT but does not have readdir_r() -#define ACE_LACKS_READDIR_R - -// Platform supports getpagesize() call (otherwise, -// ACE_PAGE_SIZE must be defined) -#define ACE_HAS_GETPAGESIZE - -// Platform supports IP multicast -#define ACE_HAS_IP_MULTICAST - -// Platform's select() uses non-const timeval* -#define ACE_HAS_NONCONST_SELECT_TIMEVAL - -// Platform supports POSIX O_NONBLOCK semantics -#define ACE_HAS_POSIX_NONBLOCK - -// Platform lacks named POSIX semaphores -#define ACE_LACKS_NAMED_POSIX_SEM - -// Platform has support for multi-byte character support compliant -// with the XPG4 Worldwide Portability Interface wide-character -// classification. -#define ACE_HAS_XPG4_MULTIBYTE_CHAR - -// No wcsstr function available for this compiler -#define ACE_LACKS_WCSSTR - -// No wctype.h available for this compiler -#define ACE_LACKS_WCTYPE_H - -// Platform supports the POSIX regular expression library. -// [Note Tandem NSK platform does have regular expression support but it -// does not follow the assumptions made by ACE. To use it would need -// to make some ACE modifications.] -//#define ACE_HAS_REGEX - -// Platform doesn't have truncate() -#define ACE_LACKS_TRUNCATE - -// Platform lacks readers/writer locks. -#define ACE_LACKS_RWLOCK_T - -// Compiler's 'new' throws exception on failure (ANSI C++ behavior). -#define ACE_NEW_THROWS_EXCEPTIONS - -// Optimize ACE_Handle_Set::count_bits for select() operations (common -// case) -#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT - -// Platform lacks setreuid() -#define ACE_LACKS_SETREUID - -// Platform lacks setregid() -#define ACE_LACKS_SETREGID - -// Compile using multi-thread libraries -#define ACE_MT_SAFE 1 - - - -// Platform supports System V IPC -#define ACE_HAS_SYSV_IPC - -#define ACE_LACKS_SO_SNDBUF -#define ACE_LACKS_SO_RCVBUF - -// Platform lacks the socketpair() call -#define ACE_LACKS_SOCKETPAIR - -// Platform limits the maximum socket message size. -#define ACE_HAS_SOCK_BUF_SIZE_MAX - -// hrtime_t is a basic type that doesn't require ACE_U64_TO_U32 conversion -#define ACE_HRTIME_T_IS_BASIC_TYPE - -// printf format specifiers for 64 bit integers -# define ACE_UINT64_FORMAT_SPECIFIER_ASCII "%Ld" -# define ACE_INT64_FORMAT_SPECIFIER_ASCII "%Ld" - -//========================================================================= -// Threads specific parts -//========================================================================= - -// Platform supports threads -#define ACE_HAS_THREADS - -// Platform supports POSIX Pthreads, of one form or another. This -// macro says the platform has a pthreads variety - should also define -// one of the below to say which one. Also may need some -// ACE_HAS_... thing for extensions. -#define ACE_HAS_PTHREADS - -// Standard pthreads supports only SCHED_FIFO -#define ACE_HAS_ONLY_SCHED_FIFO - -// Compiler/platform has thread-specific storage -#define ACE_HAS_THREAD_SPECIFIC_STORAGE - -// Platform has no implementation of pthread_condattr_setpshared(), -// even though it supports pthreads! -#define ACE_LACKS_CONDATTR_PSHARED - -// pthread_cond_timedwait does *not* reset the time argument when the -// lock is acquired. -#define ACE_LACKS_COND_TIMEDWAIT_RESET - -// Platform lacks pthread_attr_setsched() -#define ACE_LACKS_SETSCHED - -// Platform has pthread_mutexattr_setkind_np(). -#define ACE_HAS_PTHREAD_MUTEXATTR_SETKIND_NP - -// Platform lacks pthread_mutexattr_setpshared(). -#define ACE_LACKS_MUTEXATTR_PSHARED - -// Platform lacks pthread_attr_setscope() -#define ACE_LACKS_THREAD_PROCESS_SCOPING - -// Platform lacks pthread_attr_setstackaddr -#define ACE_LACKS_PTHREAD_ATTR_SETSTACKADDR - -// Defining ACE_HAS_UCONTEXT_T since G06.21 version of spthreads has -// a definition for it. -#ifdef ACE_TANDEM_T1248_PTHREADS -#define ACE_HAS_UCONTEXT_T -#endif - -#define ACE_LACKS_FD_MASK - -//========================================================================= -// Include file characteristics -//========================================================================= - -// Compiler/platform contains the <sys/syscall.h> file. -#define ACE_HAS_SYS_SYSCALL_H - -// Platform lacks malloc.h -#define ACE_LACKS_MALLOC_H - -// Platform lacks the siginfo.h include file -#define ACE_LACKS_SIGINFO_H - -// Platform doesn't define struct strrecvfd. -#define ACE_LACKS_STRRECVFD - -// Platform lacks the ucontext.h file -#define ACE_LACKS_UCONTEXT_H - -// Prototypes for both signal() and struct sigaction are consistent. -#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES - -// Platform supports the POSIX struct timespec type -#define ACE_HAS_POSIX_TIME - -// Platform/compiler supports timezone * as second parameter to gettimeofday() -#define ACE_HAS_TIMEZONE_GETTIMEOFDAY - -// Platform has <strings.h> (which contains bzero() prototype) -#define ACE_HAS_STRINGS 1 - - -// OS/compiler omits the const from the iovec parameter in the -// writev() prototype. -#define ACE_HAS_NONCONST_WRITEV - -// Platform lacks <stdint.h> -#define ACE_LACKS_STDINT_H - -// Platform lacks <inttypes.h> -#define ACE_LACKS_INTTYPES_H - -// Platform lacks <sys/select.h> -#define ACE_LACKS_SYS_SELECT_H - -// Platform lacks <dlfcn.h> -#define ACE_LACKS_DLFCN_H - -// Platform lacks <semaphore.h> -#define ACE_LACKS_SEMAPHORE_H - -// Platform lacks <poll.h> -#define ACE_LACKS_POLL_H - -//========================================================================= -// Compiler specific parts -//========================================================================= - -// Compiler/platform has correctly prototyped header files -#define ACE_HAS_CPLUSPLUS_HEADERS - -// Compiler/platform does not support the unsigned long long datatype. -#define ACE_LACKS_LONGLONG_T - -// Compiler supports the ssize_t typedef -#define ACE_HAS_SSIZE_T - -// Platform/compiler supports Standard C++ Library -#define ACE_HAS_STANDARD_CPP_LIBRARY 0 - -// Compiler's template mechanism must see source code (i.e., -// .cpp files). -#define ACE_TEMPLATES_REQUIRE_SOURCE - -// Platform has its standard c++ library in the namespace std. -#define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1 - -// Compiler doesn't support static data member templates -#define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES - -// Platform lacks "signed char" type (broken!) -// Following will not be needed if use standard c library (G06.20 and later) -#define ACE_LACKS_SIGNED_CHAR - -//========================================================================= -// Build options -//========================================================================= - -// For debugging problems in os calls (but this doesn't work too well -// since output is not interleaved properly with output from ACE_TRACE -//# define ACE_OS_TRACE(X) ::printf(X) - -// Uncomment the following if timed message blocks are needed (e.g. -// for Dynamic_Priority_Test. Otherwise leave this disabled because -// enabling it adds overhead to message blocks and timed message blocks -// are "rarely used." -//#define ACE_HAS_TIMED_MESSAGE_BLOCKS - -// Uncomment the following if tokens library is needed. -//#define ACE_HAS_TOKENS_LIBRARY - -#include /**/ "ace/post.h" - -#endif /* ACE_CONFIG_NSK_H */ diff --git a/ACE/ace/config-tandem-nsk-mips-v3.h b/ACE/ace/config-tandem-nsk-mips-v3.h deleted file mode 100644 index 0fb12f5f9ff..00000000000 --- a/ACE/ace/config-tandem-nsk-mips-v3.h +++ /dev/null @@ -1,454 +0,0 @@ -// -*- C++ -*- -// -// $Id$ - - -#ifndef ACE_CONFIG_NSK_H -#define ACE_CONFIG_NSK_H - -#include /**/ "ace/pre.h" - -// The following configuration file contains defines for Tandem NSK -// platform, MIPS processor, version 3 C++ compiler. - - -//========================================================================= -// Tandem NSK specific parts -//========================================================================= - - -// Disable pthread renaming of symbols such as "open" and "close" -#define _CMA_NOWRAPPERS_ 1 - -// Get Handle_Set.cpp to generate correct bit operations for NSK platform -#define ACE_TANDEM_NSK_BIT_ORDER - -// Use facilities provided by T1248 version of pthreads. -// (If not defined, will use old version of pthreads.) -#define ACE_TANDEM_T1248_PTHREADS - -// Use all available T1248 thread aware wrapper functions for providing -// non-blocking I/O. -// [Note: this causes a significant performance degradation] -//#define ACE_TANDEM_T1248_PTHREADS_ALL_IO_WRAPPERS - - -// Need this include here because some symbols defined by pthreads -// (e.g. timespec_t) are needed before spthread.h is normally included -// by ACE -#ifdef ACE_TANDEM_T1248_PTHREADS -#include <spthread.h> -#else -#include "pthread.h" -#include "dce/cma_dispatch_coop.h" -#endif - -// The following #defines are hacks to get around things -// that seem to be missing or different in Tandem land -#define NSIG 32 // missing from Signal.h - // note: on nsk TNS/R there is room in - // sigset_t for 128 signals but those - // above 31 are not valid. -#define MAXNAMLEN 248 // missing from dirent.h -#define ERRMAX 4218 // from errno.h - -// Following seems to be missing from G06.20 version of standard -// pthreads includes (it appeared in older version of standard pthreads) -// (SCHED_FIFO (aka cma_c_sched_fifo) used in Dynamic_Priority_Test) -#ifdef ACE_TANDEM_T1248_PTHREADS -typedef enum CMA_T_SCHED_POLICY { - cma_c_sched_fifo = 0, - cma_c_sched_rr = 1, - cma_c_sched_throughput = 2, - cma_c_sched_background = 3, - cma_c_sched_ada_low = 4 - } cma_t_sched_policy; -#endif - -// T1248 doesn't define these constants. They're defined in spt/cma.h -// (formerly dce/cma.h), but this header is not included or provided -// by T1248 G07-AAL. -#define cma_c_prio_fifo_min 16 -#define cma_c_prio_fifo_mid 24 -#define cma_c_prio_fifo_max 31 -#define cma_c_prio_rr_min 16 -#define cma_c_prio_rr_mid 24 -#define cma_c_prio_rr_max 31 -#define cma_c_prio_through_min 8 -#define cma_c_prio_through_mid 12 -#define cma_c_prio_through_max 15 -#define cma_c_prio_back_min 1 -#define cma_c_prio_back_mid 4 -#define cma_c_prio_back_max 7 - -// Enable NSK Pluggable Protocols -#define TAO_HAS_NSKPW 1 -#define TAO_HAS_NSKFS 1 - -//========================================================================= -// Platform specific parts -//========================================================================= - -// Platform lacks getpwnam_r() methods (e.g., SGI 6.2). -#define ACE_LACKS_PWD_REENTRANT_FUNCTIONS - -// Platform/compiler lacks {get,set}rlimit() function -#define ACE_LACKS_RLIMIT - -// The platform doesn't have mmap(2) -#define ACE_LACKS_MMAP - -// Platform lacks streambuf "linebuffered ()". [C++ iostream] -#define ACE_LACKS_LINEBUFFERED_STREAMBUF - -// Platform supports recvmsg and sendmsg -#define ACE_HAS_MSG - -// Platform defines ACE_HAS_MSG, but lacks msg_accrights{,len}. -#define ACE_LACKS_MSG_ACCRIGHTS - -// Platform supports sigsuspend() -#define ACE_HAS_SIGSUSPEND - -// Platform/compiler has the sigwait(2) prototype -#define ACE_HAS_SIGWAIT - -// Compiler/platform defines the sig_atomic_t typedef -#define ACE_HAS_SIG_ATOMIC_T - -// OS/compiler uses size_t * rather than int * for socket lengths -#define ACE_HAS_SIZET_SOCKET_LEN - -// OS/compiler uses void * arg 4 setsockopt() rather than const char * -#define ACE_HAS_VOIDPTR_SOCKOPT - -// The platform doesn't have mprotect(2) -#define ACE_LACKS_MPROTECT - -// Platform lacks msync() -#define ACE_LACKS_MSYNC - -// Platform does not support reentrant netdb functions (getprotobyname_r, -// getprotobynumber_r, gethostbyaddr_r, gethostbyname_r, getservbyname_r). -#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS Platform does not support - -// Platform lacks madvise() -#define ACE_LACKS_MADVISE - -// Platform lacks pri_t -#define ACE_LACKS_PRI_T - -// Platform lacks a working sbrk() -#define ACE_LACKS_SBRK - -// Platform doesn't have syscall() prototype -#define ACE_LACKS_SYSCALL - -// Platform lacks the inet_aton() function. -#define ACE_LACKS_INET_ATON - -// Compiler/platform has Dirent iterator functions -#define ACE_HAS_DIRENT - -// Platform uses ACE_HAS_DIRENT but does not have readdir_r() -#define ACE_LACKS_READDIR_R - -// Platform supports getpagesize() call (otherwise, -// ACE_PAGE_SIZE must be defined) -#define ACE_HAS_GETPAGESIZE - -// Platform supports IP multicast -#define ACE_HAS_IP_MULTICAST - -// Platform's select() uses non-const timeval* -#define ACE_HAS_NONCONST_SELECT_TIMEVAL - -// Platform supports POSIX O_NONBLOCK semantics -#define ACE_HAS_POSIX_NONBLOCK - -// Platform lacks named POSIX semaphores -#define ACE_LACKS_NAMED_POSIX_SEM - -// Platform has support for multi-byte character support compliant -// with the XPG4 Worldwide Portability Interface wide-character -// classification. -#define ACE_HAS_XPG4_MULTIBYTE_CHAR - -// No wcsstr function available for this compiler -#define ACE_LACKS_WCSSTR - -// No wctype.h available for this compiler -#define ACE_LACKS_WCTYPE_H - -// Platform supports the POSIX regular expression library. -// [Note Tandem NSK platform does have regular expresson support but it -// does not follow the assumptions made by ACE. To use it would need -// to make some ACE modifications.] -//#define ACE_HAS_REGEX - -// Platform doesn't have truncate() -#define ACE_LACKS_TRUNCATE - -// Platform lacks readers/writer locks. -#define ACE_LACKS_RWLOCK_T - -// Compiler's 'new' throws exception on failure (ANSI C++ behavior). -#define ACE_NEW_THROWS_EXCEPTIONS - -// Optimize ACE_Handle_Set::count_bits for select() operations (common -// case) -#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT - -// Platform lacks setreuid() -#define ACE_LACKS_SETREUID - -// Platform lacks setregid() -#define ACE_LACKS_SETREGID - -// Compile using multi-thread libraries -#define ACE_MT_SAFE 1 - - - -// Platform supports System V IPC -#define ACE_HAS_SYSV_IPC - -#define ACE_LACKS_SO_SNDBUF -#define ACE_LACKS_SO_RCVBUF - -// Platform lacks the socketpair() call -#define ACE_LACKS_SOCKETPAIR - -// Platform limits the maximum socket message size. -#define ACE_HAS_SOCK_BUF_SIZE_MAX - -// hrtime_t is a basic type that doesn't require ACE_U64_TO_U32 conversion -#define ACE_HRTIME_T_IS_BASIC_TYPE - -// printf format specifiers for 64 bit integers -# define ACE_UINT64_FORMAT_SPECIFIER_ASCII "%Ld" -# define ACE_INT64_FORMAT_SPECIFIER_ASCII "%Ld" - -// Use larger default buffer size for ease of interoperability -#define ACE_DEFAULT_CDR_BUFSIZE 4096 - -// Size of a wchar -#define ACE_SIZEOF_WCHAR 2 - -// Platform lacks time typedefs -#define ACE_LACKS_SUSECONDS_T -#define ACE_LACKS_USECONDS_T - -// Platform lacks setegid() and seteuid() -#define ACE_LACKS_SETEGID -#define ACE_LACKS_SETEUID - -// Platform lacks vsnprintf() -#define ACE_LACKS_VSNPRINTF - -// Platform lacks log2() -#define ACE_LACKS_LOG2 - -// Platform lacks alphasort() -#define ACE_LACKS_ALPHASORT - -#define ACE_LACKS_FD_MASK -#define ACE_LACKS_NFDBITS - -//========================================================================= -// Threads specific parts -//========================================================================= - -// Platform supports threads -#define ACE_HAS_THREADS - -// Platform supports POSIX Pthreads, of one form or another. This -// macro says the platform has a pthreads variety - should also define -// one of the below to say which one. Also may need some -// ACE_HAS_... thing for extensions. -#define ACE_HAS_PTHREADS - -// Standard pthreads supports only SCHED_FIFO -#define ACE_HAS_ONLY_SCHED_FIFO - -// Compiler/platform has thread-specific storage -#define ACE_HAS_THREAD_SPECIFIC_STORAGE - -// Platform has no implementation of pthread_condattr_setpshared(), -// even though it supports pthreads! -#define ACE_LACKS_CONDATTR_PSHARED - -// pthread_cond_timedwait does *not* reset the time argument when the -// lock is acquired. -#define ACE_LACKS_COND_TIMEDWAIT_RESET - -// Platform lacks pthread_attr_setsched() -#define ACE_LACKS_SETSCHED - -// Platform has pthread_getschedparam and pthread_setschedparam -// even when ACE_LACKS_SETSCHED is defined. -#define ACE_HAS_PTHREAD_SCHEDPARAM - -// Platform has pthread_mutexattr_setkind_np(). -#define ACE_HAS_PTHREAD_MUTEXATTR_SETKIND_NP - -// Platform lacks pthread_mutexattr_setpshared(). -#define ACE_LACKS_MUTEXATTR_PSHARED - -// Platform lacks pthread_attr_setscope() -#define ACE_LACKS_THREAD_PROCESS_SCOPING - -// Platform lacks pthread_attr_setstackaddr -#define ACE_LACKS_PTHREAD_ATTR_SETSTACKADDR - -// Platform lacks pthread_attr_setstack -#define ACE_LACKS_PTHREAD_ATTR_SETSTACK - -// Defining ACE_HAS_UCONTEXT_T since G06.21 version of spthreads has -// a definition for it. -#ifdef ACE_TANDEM_T1248_PTHREADS -#define ACE_HAS_UCONTEXT_T -#endif - -//========================================================================= -// Include file characteristics -//========================================================================= - -// Compiler/platform contains the <sys/syscall.h> file. -#define ACE_HAS_SYS_SYSCALL_H - -// Platform lacks malloc.h -#define ACE_LACKS_MALLOC_H - -// Platform lacks the siginfo.h include file -#define ACE_LACKS_SIGINFO_H - -// Platform doesn't define struct strrecvfd. -#define ACE_LACKS_STRRECVFD - -// Platform lacks the ucontext.h file -#define ACE_LACKS_UCONTEXT_H - -// Prototypes for both signal() and struct sigaction are consistent. -#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES - -// Platform supports the POSIX struct timespec type -#define ACE_HAS_POSIX_TIME - -// Platform/compiler supports timezone * as second parameter to gettimeofday() -#define ACE_HAS_TIMEZONE_GETTIMEOFDAY - -// Platform has <strings.h> (which contains bzero() prototype) -#define ACE_HAS_STRINGS 1 - - -// OS/compiler omits the const from the iovec parameter in the -// writev() prototype. -#define ACE_HAS_NONCONST_WRITEV - -// Platform lacks <stdint.h> -#define ACE_LACKS_STDINT_H - -// Platform lacks <inttypes.h> -#define ACE_LACKS_INTTYPES_H - -// Platform lacks <sys/select.h> -#define ACE_LACKS_SYS_SELECT_H - -// Platform lacks <dlfcn.h> -#define ACE_LACKS_DLFCN_H - -// Platform lacks <semaphore.h> -#define ACE_LACKS_SEMAPHORE_H - -// Platform lacks <poll.h> -#define ACE_LACKS_POLL_H - -// Platform lacks <sys/sysctl.h> -#define ACE_LACKS_SYS_SYSCTL_H - -//========================================================================= -// Compiler specific parts -//========================================================================= - -// Compiler/platform has correctly prototyped header files -#define ACE_HAS_CPLUSPLUS_HEADERS - -// Compiler/platform does not support the unsigned long long datatype. -#define ACE_LACKS_UNSIGNEDLONGLONG_T - -// Compiler supports the ssize_t typedef -#define ACE_HAS_SSIZE_T - -// Platform/compiler supports Standard C++ Library -#define ACE_HAS_STANDARD_CPP_LIBRARY 1 - -// Compiler's template mechanism must see source code (i.e., -// .cpp files). -#define ACE_TEMPLATES_REQUIRE_SOURCE - -// Platform/Compiler supports a String class -#define ACE_HAS_STRING_CLASS -#define ACE_HAS_STDCPP_STL_INCLUDES - -// Platform has its standard c++ library in the namespace std. -#define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1 - -// Compiler doesn't support static data member templates -#define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES - -// Platform lacks "signed char" type (broken!) -// Following will not be needed if use standard c library (G06.20 and later) -#define ACE_LACKS_SIGNED_CHAR - -// Compiler can handle any operators in namespace -#define ACE_ANY_OPS_USE_NAMESPACE - -// Platform lacks intptr_t typedef -#define ACE_LACKS_INTPTR_T - -//========================================================================= -// C++ version3 import/export macros -//========================================================================= - -// Define the export macros needed to export symbols outside a DLL -// The ACE_IMPORT_SINGLETON_DECLARE macro has been modified to not explicitly -// instantiate the class template. -#if defined(USE_EXPLICIT_EXPORT) -#define ACE_LACKS_INLINE_FUNCTIONS - -#define ACE_HAS_CUSTOM_EXPORT_MACROS 1 -#define ACE_Proper_Export_Flag export$ -#define ACE_Proper_Import_Flag import$ -#define ACE_EXPORT_SINGLETON_DECLARATION(T) template class export$ T -#define ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) template class export$ SINGLETON_TYPE<CLASS, LOCK>; -#define ACE_IMPORT_SINGLETON_DECLARATION(T) template class import$ T -#define ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) template class import$ SINGLETON_TYPE <CLASS, LOCK>; -#endif - - -//========================================================================= -// Build options -//========================================================================= - -// For debugging problems in os calls (but this doesn't work too well -// since output is not interleaved properly with output from ACE_TRACE -//# define ACE_OS_TRACE(X) ::printf(X) - -// Uncomment the following if timed message blocks are needed (e.g. -// for Dynamic_Priority_Test. Otherwise leave this disabled because -// enabling it adds overhead to message blocks and timed message blocks -// are "rarely used." -//#define ACE_HAS_TIMED_MESSAGE_BLOCKS - -// Uncomment the following if tokens library is needed. -//#define ACE_HAS_TOKENS_LIBRARY - -// NonStop CORBA uses the XML Service Configurator -#define ACE_HAS_XML_SVC_CONF - -#define ACE_LD_SEARCH_PATH "_RLD_LIB_PATH" - -#include /**/ "ace/post.h" - -#endif /* ACE_CONFIG_NSK_H */ diff --git a/ACE/ace/os_include/os_pthread.h b/ACE/ace/os_include/os_pthread.h index d49662cfbb5..48675c666e7 100644 --- a/ACE/ace/os_include/os_pthread.h +++ b/ACE/ace/os_include/os_pthread.h @@ -48,11 +48,7 @@ #if !defined (ACE_LACKS_PTHREAD_H) extern "C" { -# if defined (ACE_TANDEM_T1248_PTHREADS) -# include /**/ <spthread.h> -# else # include /**/ <pthread.h> -# endif } #endif /* !ACE_LACKS_PTHREAD_H */ diff --git a/ACE/performance-tests/Server_Concurrency/Latency_Stats.h b/ACE/performance-tests/Server_Concurrency/Latency_Stats.h index e8b14caac73..12d5fe02f53 100644 --- a/ACE/performance-tests/Server_Concurrency/Latency_Stats.h +++ b/ACE/performance-tests/Server_Concurrency/Latency_Stats.h @@ -35,12 +35,7 @@ inline void Latency_Stats::sample (ACE_hrtime_t sample) { this->sum_ += sample; -#ifndef ACE_LACKS_LONGLONG_T this->sum2_ += sample * sample; -#else - // possible loss of precision here due to lack of 64bit support - this->sum2_ += sample * sample.lo(); -#endif if (this->n_ == 0) { this->min_ = sample; @@ -61,13 +56,8 @@ Latency_Stats::dump_results (const ACE_TCHAR *test_name, return; ACE_hrtime_t avg = this->sum_ / this->n_; -#ifndef ACE_LACKS_LONGLONG_T ACE_hrtime_t dev = this->sum2_ / this->n_ - avg*avg; -#else - ACE_hrtime_t dev = - this->sum2_ / this->n_ - avg.lo()*avg.lo(); -#endif ACE_High_Res_Timer::global_scale_factor_type gsf = ACE_High_Res_Timer::global_scale_factor (); diff --git a/ACE/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp b/ACE/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp index 5703ff2a1af..866e6416571 100644 --- a/ACE/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp +++ b/ACE/performance-tests/Server_Concurrency/Leader_Follower/leader_follower.cpp @@ -173,15 +173,9 @@ Leader_Follower_Task::svc (void) if (debug >= PRINT_INDIVIDUAL_LATENCY) { -#ifndef ACE_LACKS_LONGLONG_T ACE_DEBUG ((LM_DEBUG, "(%t) latency from start of burst: %Q\n", latency_from_start_of_burst)); -#else - ACE_DEBUG ((LM_DEBUG, - "(%t) latency from start of burst: %u\n", - latency_from_start_of_burst.lo())); -#endif } } } diff --git a/ACE/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp b/ACE/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp index 5bb58d42397..8ef203c69e0 100644 --- a/ACE/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp +++ b/ACE/performance-tests/Server_Concurrency/Queue_Based_Workers/workers.cpp @@ -144,15 +144,9 @@ Worker_Task::svc (void) if (debug >= PRINT_INDIVIDUAL_LATENCY) { -#ifndef ACE_LACKS_LONGLONG_T ACE_DEBUG ((LM_DEBUG, "(%t) latency from start of burst: %Q\n", latency_from_start_of_burst)); -#else - ACE_DEBUG ((LM_DEBUG, - "(%t) latency from start of burst: %u\n", - latency_from_start_of_burst.lo())); -#endif } } diff --git a/ACE/performance-tests/UDP/udp_test.cpp b/ACE/performance-tests/UDP/udp_test.cpp index c03937ca6a0..0da5570decf 100644 --- a/ACE/performance-tests/UDP/udp_test.cpp +++ b/ACE/performance-tests/UDP/udp_test.cpp @@ -261,15 +261,9 @@ Client::run (void) if (i < 0 ) { -#ifndef ACE_LACKS_LONGLONG_T ACE_DEBUG ((LM_DEBUG, "Ignoring first sample of %u usecs\n", (ACE_UINT32) (sample))); -#else - ACE_DEBUG ((LM_DEBUG, - "Ignoring first sample of %u usecs\n", - (ACE_UINT32) (sample.lo()))); -#endif continue; } else if (max_allow > 0 && sample > max_allow) diff --git a/ACE/tests/Atomic_Op_Test.cpp b/ACE/tests/Atomic_Op_Test.cpp index 3eb37a49abb..de0cba33ca1 100644 --- a/ACE/tests/Atomic_Op_Test.cpp +++ b/ACE/tests/Atomic_Op_Test.cpp @@ -316,9 +316,7 @@ run_main (int, ACE_TCHAR *[]) retval += test <short, int> (ACE_TEXT("short"), ITERATIONS); retval += test <unsigned short, int> (ACE_TEXT("unsigned short"), ITERATIONS); retval += test <bool> (ACE_TEXT("bool"), ITERATIONS); -#if !defined (ACE_LACKS_LONGLONG_T) retval += test <long long, int> (ACE_TEXT("long long"), ITERATIONS); -#endif #if defined (ACE_HAS_THREADS) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing exchange with long\n"))); diff --git a/ACE/tests/Basic_Types_Test.cpp b/ACE/tests/Basic_Types_Test.cpp index 64c5b49ff00..f331d8d97c4 100644 --- a/ACE/tests/Basic_Types_Test.cpp +++ b/ACE/tests/Basic_Types_Test.cpp @@ -53,141 +53,6 @@ check (const ACE_TCHAR *message, u_int i, u_int j) } } -// If the platform lacks an unsigned long long, define one. -#if defined (ACE_LACKS_LONGLONG_T) || defined (ACE_LACKS_UNSIGNEDLONGLONG_T) -static -u_int -check_ace_u_longlong (const ACE_TCHAR *const name, - const ACE_U_LongLong ull, - const u_long hi, - const u_long lo) -{ - if (ull.hi () == hi && ull.lo () == lo) - return 0; - else - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%s; hi: %x, should be %x; ") - ACE_TEXT ("lo: %x, should be %x.\n"), - name, ull.hi (), hi, ull.lo (), lo), - 1); -} - -static -u_int -test_ace_u_longlong (void) -{ - u_int errors = 0; - - ACE_U_LongLong ull1 (0x21,1); - errors += check_ace_u_longlong (ACE_TEXT ("ull1"), ull1, 1, 0x21); - - ACE_U_LongLong ull2 (0x20,2); - errors += check_ace_u_longlong (ACE_TEXT ("ull2"), ull2, 2, 0x20); - - ull2 -= ull1; - errors += check_ace_u_longlong (ACE_TEXT ("ull2"), ull2, 0, 0xfffffffful); - - ull2 += ull1; - errors += check_ace_u_longlong (ACE_TEXT ("ull2"), ull2, 2, 0x20); - - ACE_U_LongLong ull3 = ull1 + ull1; - errors += check_ace_u_longlong (ACE_TEXT ("ull3"), ull3, 2, 0x42); - - ACE_U_LongLong ull4 = ACE_U_LongLong (0x1111, 0) - - ACE_U_LongLong (0x1112, 0); - errors += check_ace_u_longlong (ACE_TEXT ("ull4"), ull4, 0xfffffffful, 0xfffffffful); - - ACE_U_LongLong ull5 = ACE_U_LongLong (0x1111, 1) - - ACE_U_LongLong (0x1112, 0); - errors += check_ace_u_longlong (ACE_TEXT ("ull5"), ull5, 0, 0xfffffffful); - - ++ull5; - errors += check_ace_u_longlong (ACE_TEXT ("ull5"), ull5, 1, 0); - - ACE_U_LongLong ull6 = ull2 + ACE_U_LongLong (0, 1); - errors += check_ace_u_longlong (ACE_TEXT ("ull6"), ull6, 3, 0x20); - - ull6 += ACE_U_LongLong (0xffffffff, 0xfff0); - errors += check_ace_u_longlong (ACE_TEXT ("ull6"), ull6, 0xfff4, 0x1f); - - ++ull6; - errors += check_ace_u_longlong (ACE_TEXT ("ull6"), ull6, 0xfff4, 0x20); - - // The hi part of ull6 will be lost in the following, because - // the quotient has only 32 bits. - errors += check_ace_u_longlong (ACE_TEXT ("ull6 / 1"), - (ACE_U_LongLong) (ull6 / 1u), - 0, 0x20); - - // There's apparently a small loss in precision in - // ACE_U_LongLong::operator/. It calculates - // ull6 / 0xd0000 as 0x13b013b4 instead of 0x13b04ec4. - errors += check_ace_u_longlong (ACE_TEXT ("ull6 / 0x10000 / 0xd"), - (ACE_U_LongLong) (ull6 / 0x10000u / 0xd), - 0, 0x13b04ec4); - - errors += check_ace_u_longlong (ACE_TEXT ("ull6 % 5"), - (ACE_U_LongLong) (ull6 % 5), - 0, 1); - - errors += check_ace_u_longlong (ACE_TEXT ("ull6 % 0x20007"), - (ACE_U_LongLong) (ull6 % 0x20007), - 0, 0x3f63); - - ACE_U_LongLong ull7 (12); - ull7 *= 3125; - errors += check_ace_u_longlong (ACE_TEXT ("12 * 3125"), - ull7, - 0, 37500); - - ull7 *= 100; - errors += check_ace_u_longlong (ACE_TEXT ("37500 * 100"), - ull7, - 0, 3750000); - - errors += check_ace_u_longlong (ACE_TEXT ("3750000 << 16"), - ull7 << 16 , - 0x39, 0x38700000); - - errors += check_ace_u_longlong (ACE_TEXT ("3750000 >> 16"), - ull7 >> 16, - 0, 0x39); - - ull7 <<= 32; - errors += check_ace_u_longlong (ACE_TEXT ("3750000 <<= 32"), - ull7, - 3750000, 0); - - ull7 >>= 12; - errors += check_ace_u_longlong (ACE_TEXT ("3750000 <<= 32 >>= 15"), - ull7, - 0x393, 0x87000000); - - ACE_U_LongLong ull8 (0x0f0f, 0xf0f0); - ACE_U_LongLong ull9 (0xf0f0, 0xf0f0); - ull8 |= ull9; - errors += check_ace_u_longlong (ACE_TEXT ("ull8 |= ull9"), - ull8, - 0xf0f0, 0xffff); - - ull9.lo (0x5678); - ull9.hi (0x1234); - ull8 &= ull9; - errors += check_ace_u_longlong (ACE_TEXT ("ull8 &= 0x12345678"), - ull9, - 0x1234, 0x5678); - - return errors; -} - -#else -static u_int -test_ace_u_longlong (void) -{ - return 0; /* Platform has native types; no need to test ACE_U_LongLong */ -} -#endif /* ACE_LACKS_LONGLONG_T || ACE_LACKS_UNSIGNEDLONGLONG_T */ - int run_main (int, ACE_TCHAR *[]) { @@ -245,8 +110,6 @@ run_main (int, ACE_TCHAR *[]) errors += check (ACE_TEXT ("sizeof (ACE_UINT64) is %u%s"), sizeof (ACE_UINT64), 8); - errors += test_ace_u_longlong (); - // ACE assumes sizeof (ptrdiff_t) == sizeof (void*) if (sizeof (ptrdiff_t) == sizeof (void *)) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("sizeof (ptrdiff_t) == sizeof (void*)\n"))); diff --git a/ACE/tests/CDR_Array_Test.cpp b/ACE/tests/CDR_Array_Test.cpp index d3690a37b62..be6448e9771 100644 --- a/ACE/tests/CDR_Array_Test.cpp +++ b/ACE/tests/CDR_Array_Test.cpp @@ -788,7 +788,6 @@ struct LongHelper } }; -#if !defined (ACE_LACKS_LONGLONG_T) struct LongLongHelper { static const ACE_TCHAR* name () @@ -821,7 +820,6 @@ struct LongLongHelper return sizeof(ACE_CDR::LongLong); } }; -#endif /* ! ACE_LACKS_LONGLONG_T */ struct CharHelper { @@ -981,12 +979,10 @@ run_main (int argc, ACE_TCHAR *argv[]) CDR_Test<ACE_CDR::Float, FloatHelper> test (ftotal, niter, use_array); } -#if !defined (ACE_LACKS_LONGLONG_T) { CDR_Test<ACE_CDR::LongLong, LongLongHelper> test (qtotal, niter, use_array); } -#endif /* ! ACE_LACKS_LONGLONG_T */ { CDR_Test<ACE_CDR::Long, LongHelper> test (wtotal, niter, use_array); diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index 9fc463b3636..3a065100bb0 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,12 @@ +Tue May 15 18:17:45 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl> + + * performance-tests/Protocols/Sender/Sender_exec.cpp: + * tools/IDL3_to_IDL2/basic_visitor.cpp: + * tools/IDL3_to_XMI/be_sunsoft.cpp: + Removed support for Tandem NSK. That was the last platform that + needed the emulated versions of ACE_INT64 and ACE_UINT64, that + emulation has now been removed + Tue May 15 13:35:32 UTC 2012 Marcel Smit <msmit@remedy.nl> * MPC/config/dds4ccm.mpb: diff --git a/CIAO/performance-tests/Protocols/Sender/Sender_exec.cpp b/CIAO/performance-tests/Protocols/Sender/Sender_exec.cpp index a35c67d53ac..48c5d806b09 100644 --- a/CIAO/performance-tests/Protocols/Sender/Sender_exec.cpp +++ b/CIAO/performance-tests/Protocols/Sender/Sender_exec.cpp @@ -26,11 +26,7 @@ to_seconds (ACE_UINT64 hrtime, ACE_UINT32 sf) { double seconds = -#if defined ACE_LACKS_LONGLONG_T - hrtime / sf; -#else /* ! ACE_LACKS_LONGLONG_T */ static_cast<double> (ACE_UINT64_DBLCAST_ADAPTER (hrtime / sf)); -#endif /* ! ACE_LACKS_LONGLONG_T */ seconds /= ACE_HR_SCALE_CONVERSION; return seconds; diff --git a/CIAO/tools/IDL3_to_IDL2/basic_visitor.cpp b/CIAO/tools/IDL3_to_IDL2/basic_visitor.cpp index fb3aad9d368..4699779de5d 100644 --- a/CIAO/tools/IDL3_to_IDL2/basic_visitor.cpp +++ b/CIAO/tools/IDL3_to_IDL2/basic_visitor.cpp @@ -1123,16 +1123,12 @@ basic_visitor::gen_label_value (AST_UnionLabel *node) *os << ev->u.ulval; break; case AST_Expression::EV_longlong: -#if ! defined (ACE_LACKS_LONGLONG_T) this->os->print ("%lld", ev->u.llval); -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ break; case AST_Expression::EV_ulonglong: -#if ! defined (ACE_LACKS_LONGLONG_T) *os << "ACE_UINT64_LITERAL ("; this->os->print (ACE_UINT64_FORMAT_SPECIFIER_ASCII, ev->u.ullval); *os << ")"; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ break; case AST_Expression::EV_char: *os << ev->u.cval; diff --git a/CIAO/tools/IDL3_to_XMI/be_sunsoft.cpp b/CIAO/tools/IDL3_to_XMI/be_sunsoft.cpp index c056189b5e9..d04e6c1f287 100644 --- a/CIAO/tools/IDL3_to_XMI/be_sunsoft.cpp +++ b/CIAO/tools/IDL3_to_XMI/be_sunsoft.cpp @@ -86,9 +86,6 @@ TAO_SunSoft_OutStream::print (AST_Expression *expr) case AST_Expression::EV_ulong: this->TAO_OutStream::print (ACE_UINT32_FORMAT_SPECIFIER_ASCII "%c", ev->u.ulval, 'U'); break; - // The ACE_LACKS_LONGLONG_T guards have been removed around - // the next 2 cases since the macros now used should work - // whether native 64-bit integers are defined or not. case AST_Expression::EV_longlong: this->TAO_OutStream::print ("ACE_INT64_LITERAL ("); this->TAO_OutStream::print (ACE_INT64_FORMAT_SPECIFIER_ASCII, diff --git a/TAO/ChangeLog b/TAO/ChangeLog index bb72e6acbd1..8258fce4acc 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,55 @@ +Tue May 15 18:17:07 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/ast/ast_expression.cpp: + * TAO_IDL/ast/ast_union.cpp: + * TAO_IDL/be/be_helper.cpp: + * TAO_IDL/fe/y.tab.cpp: + * TAO_IDL/include/ast_expression.h: + * examples/RTCORBA/Activity/Task_Stats.inl: + * examples/RTCORBA/Activity/Task_Stats.cpp: + * examples/RTCORBA/Activity/Thread_Task.cpp: + * orbsvcs/IFR_Service/ifr_adding_visitor.cpp: + * orbsvcs/examples/Log/Basic/TLS_Client.cpp: + * orbsvcs/examples/Log/Event/Event_Supplier.cpp: + * orbsvcs/examples/Log/Notify/Notify_Supplier.cpp: + * orbsvcs/examples/Log/RTEvent/RTEvent_Supplier.cpp: + * orbsvcs/orbsvcs/IFRService/Container_i.cpp: + * orbsvcs/orbsvcs/IFRService/UnionDef_i.cpp: + * orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp: + * orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.cpp: + * orbsvcs/orbsvcs/Notify/Name_Value_Pair.cpp: + * orbsvcs/orbsvcs/Notify/XML_Saver.cpp: + * orbsvcs/orbsvcs/Time/Timer_Helper.cpp: + * orbsvcs/orbsvcs/Time_Utilities.cpp: + * orbsvcs/tests/AVStreams/Simple_Two_Stage/Receiver_Stats.inl: + * orbsvcs/tests/AVStreams/Simple_Two_Stage/Receiver_Stats.cpp: + * orbsvcs/tests/InterfaceRepo/IFR_Test/Admin_Client.cpp: + * orbsvcs/tests/Log/Basic_Log_Test/Basic_Log_Test.cpp: + * orbsvcs/tests/Notify/lib/Task_Stats.inl: + * orbsvcs/tests/Notify/lib/Task_Stats.cpp: + * orbsvcs/tests/Notify/lib/common.cpp: + * orbsvcs/tests/Time/Client_i.cpp: + * performance-tests/POA/Demux/demux_test_client.cpp: + * performance-tests/RTCorba/Thread_Pool/client.cpp: + * performance-tests/Throughput/Receiver.cpp: + * performance-tests/Throughput/client.cpp: + * tao/AnyTypeCode/Any_Basic_Impl.h: + * tao/AnyTypeCode/Any_Basic_Impl.cpp: + * tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp: + * tao/Default_Endpoint_Selector_Factory.h: + * tao/DynamicAny/DynAny_i.cpp: + * tao/DynamicAny/DynUnion_i.cpp: + * tao/MProfile.inl: + * tao/TypeCodeFactory/TypeCodeFactory_i.cpp: + * tao/orb.idl: + * tests/Param_Test/anyop.cpp: + * tests/Param_Test/ulonglong.cpp: + * tests/Policies/Manipulation.cpp: + * tests/Queued_Message_Test/Queued_Message_Test.cpp: + Removed support for Tandem NSK. That was the last platform that + needed the emulated versions of ACE_INT64 and ACE_UINT64, that + emulation has now been removed + Tue May 15 13:43:00 UTC 2012 Marcel Smit <msmit@remedy.nl> * TAO_IDL/be/be_codegen.cpp: diff --git a/TAO/TAO_IDL/ast/ast_expression.cpp b/TAO/TAO_IDL/ast/ast_expression.cpp index 285df60d56c..9b6883266da 100644 --- a/TAO/TAO_IDL/ast/ast_expression.cpp +++ b/TAO/TAO_IDL/ast/ast_expression.cpp @@ -330,11 +330,7 @@ AST_Expression::AST_Expression (ACE_CDR::ULongLong ulv) AST_ExprValue); this->pd_ev->et = EV_ulonglong; -#if defined (ACE_LACKS_LONGLONG_T) - this->pd_ev->u.ulval = ulv; -#else this->pd_ev->u.ullval = ulv; -#endif } // An AST_Expression denoting an unsigned long integer. @@ -354,11 +350,7 @@ AST_Expression::AST_Expression (ACE_CDR::ULong ulv, AST_ExprValue); this->pd_ev->et = t; -#if defined (ACE_LACKS_LONGLONG_T) - this->pd_ev->u.ulval = ulv; -#else this->pd_ev->u.ullval = ulv; -#endif } // An AST_Expression denoting a 32-bit floating point number. @@ -557,7 +549,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_short; return ev; case AST_Expression::EV_longlong: -#if ! defined (ACE_LACKS_LONGLONG_T) if (ev->u.llval > (ACE_CDR::LongLong) ACE_INT16_MAX || ev->u.llval < (ACE_CDR::LongLong) ACE_INT16_MIN) { @@ -567,11 +558,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->u.sval = (short) ev->u.llval; ev->et = AST_Expression::EV_short; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_ulonglong: -#if ! defined (ACE_LACKS_LONGLONG_T) if ((ev->u.ullval & ACE_INT16_MAX) != ev->u.ullval) { return 0; @@ -580,9 +567,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->u.sval = (short) ev->u.ullval; ev->et = AST_Expression::EV_short; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_bool: ev->u.sval = (short) ev->u.bval; ev->et = AST_Expression::EV_short; @@ -668,7 +652,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_ushort; return ev; case AST_Expression::EV_longlong: -#if ! defined (ACE_LACKS_LONGLONG_T) if (ev->u.llval > (ACE_CDR::LongLong) ACE_UINT16_MAX || ev->u.llval < 0) { @@ -678,11 +661,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->u.usval = (unsigned short) ev->u.llval; ev->et = AST_Expression::EV_ushort; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_ulonglong: -#if ! defined (ACE_LACKS_LONGLONG_T) if ((ev->u.ullval & ACE_UINT16_MAX) != ev->u.ullval) { return 0; @@ -691,9 +670,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->u.usval = (unsigned short) ev->u.ullval; ev->et = AST_Expression::EV_ushort; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_bool: ev->u.usval = (unsigned short) ev->u.bval; ev->et = AST_Expression::EV_ushort; @@ -768,7 +744,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_long; return ev; case AST_Expression::EV_longlong: -#if ! defined (ACE_LACKS_LONGLONG_T) if (ev->u.llval > (ACE_CDR::LongLong) ACE_INT32_MAX || ev->u.llval < (ACE_CDR::LongLong) ACE_INT32_MIN) { @@ -777,11 +752,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->u.lval = (long) ev->u.llval; ev->et = AST_Expression::EV_long; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_ulonglong: -#if ! defined (ACE_LACKS_LONGLONG_T) if ((ev->u.ullval & ACE_INT32_MAX) != ev->u.ullval) { return 0; @@ -790,9 +761,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->u.lval = (long) ev->u.ullval; ev->et = AST_Expression::EV_long; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_bool: ev->u.lval = (long) ev->u.bval; ev->et = AST_Expression::EV_long; @@ -867,7 +835,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ulong: return ev; case AST_Expression::EV_longlong: -#if ! defined (ACE_LACKS_LONGLONG_T) if (ev->u.llval > (ACE_CDR::LongLong) ACE_UINT32_MAX || ev->u.llval < 0) { @@ -877,11 +844,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->u.ulval = (unsigned long) ev->u.llval; ev->et = AST_Expression::EV_ulong; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_ulonglong: -#if ! defined (ACE_LACKS_LONGLONG_T) if ((ev->u.ullval & ACE_UINT32_MAX) != ev->u.ullval) { return 0; @@ -889,9 +852,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->u.ulval = (unsigned long) ev->u.ullval; ev->et = AST_Expression::EV_ulong; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_bool: ev->u.ulval = (unsigned long) ev->u.bval; ev->et = AST_Expression::EV_ulong; @@ -944,7 +904,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, return 0; } case AST_Expression::EV_longlong: -#if ! defined (ACE_LACKS_LONGLONG_T) switch (ev->et) { case AST_Expression::EV_short: @@ -1021,11 +980,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_object: return 0; } -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_ulonglong: -#if ! defined (ACE_LACKS_LONGLONG_T) switch (ev->et) { case AST_Expression::EV_short: @@ -1071,15 +1026,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_ulonglong; return ev; case AST_Expression::EV_float: -#if defined (ACE_LACKS_UNSIGNEDLONGLONG_T) - if (ev->u.fval < 0.0 - || ev->u.fval > (float) ACE_INT64_MAX) - { - return 0; - } - - ev->u.ullval = static_cast<ACE_UINT32> (ev->u.fval); -#else if (ev->u.fval < 0.0 || ev->u.fval > (float) ACE_UINT64_MAX) { @@ -1087,20 +1033,10 @@ coerce_value (AST_Expression::AST_ExprValue *ev, } ev->u.ullval = static_cast<ACE_UINT64> (ev->u.fval); -#endif ev->et = AST_Expression::EV_ulonglong; return ev; case AST_Expression::EV_double: -#if defined (ACE_LACKS_UNSIGNEDLONGLONG_T) - if (ev->u.dval < 0.0 - || ev->u.dval > (double) ACE_INT64_MAX) - { - return 0; - } - - ev->u.ullval = static_cast<ACE_UINT32> (ev->u.dval); -#else if (ev->u.dval < 0.0 || ev->u.dval > (double) ACE_UINT64_MAX) { @@ -1108,7 +1044,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, } ev->u.ullval = static_cast<ACE_UINT64> (ev->u.dval); -#endif ev->et = AST_Expression::EV_ulonglong; return ev; @@ -1139,9 +1074,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_object: return 0; } -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_bool: switch (ev->et) { @@ -1162,21 +1094,13 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_bool; return ev; case AST_Expression::EV_longlong: -#if ! defined (ACE_LACKS_LONGLONG_T) ev->u.bval = (ev->u.llval == 0) ? false : true; ev->et = AST_Expression::EV_bool; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_ulonglong: -#if ! defined (ACE_LACKS_LONGLONG_T) ev->u.bval = (ev->u.ullval == 0) ? false : true; ev->et = AST_Expression::EV_bool; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_bool: return ev; case AST_Expression::EV_float: @@ -1229,7 +1153,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_float; return ev; case AST_Expression::EV_longlong: -#if ! defined (ACE_LACKS_LONGLONG_T) if (ev->u.llval > FLT_MAX || ev->u.llval < -(ACE_FLT_MAX)) { @@ -1238,17 +1161,10 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->u.fval = (float) ev->u.llval; ev->et = AST_Expression::EV_float; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_ulonglong: -#if ! defined (ACE_LACKS_LONGLONG_T) ev->u.fval = (float) ((ACE_CDR::LongLong) ev->u.ullval); ev->et = AST_Expression::EV_float; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_bool: ev->u.fval = (float) ((ev->u.bval == true) ? 1.0 : 0.0); ev->et = AST_Expression::EV_float; @@ -1307,15 +1223,10 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_double; return ev; case AST_Expression::EV_longlong: -#if ! defined (ACE_LACKS_LONGLONG_T) ev->u.dval = (double) ev->u.llval; ev->et = AST_Expression::EV_double; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_ulonglong: -#if ! defined (ACE_LACKS_LONGLONG_T) // Some compilers don't implement unsigned 64-bit to double // conversions, so we are stuck with the signed 64-bit max value. if (ev->u.ullval > ACE_INT64_MAX) @@ -1326,9 +1237,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->u.dval = (double) ((ACE_CDR::LongLong) ev->u.ullval); ev->et = AST_Expression::EV_double; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_bool: ev->u.dval = (ev->u.bval == true) ? 1.0 : 0.0; ev->et = AST_Expression::EV_double; @@ -1403,7 +1311,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_char; return ev; case AST_Expression::EV_longlong: -#if ! defined (ACE_LACKS_LONGLONG_T) if (ev->u.llval > (ACE_CDR::LongLong) ACE_CHAR_MAX || ev->u.llval < (ACE_CDR::LongLong) ACE_CHAR_MIN) { @@ -1413,11 +1320,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->u.cval = (char) ev->u.llval; ev->et = AST_Expression::EV_char; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_ulonglong: -#if ! defined (ACE_LACKS_LONGLONG_T) if (( ev->u.ullval & ACE_CHAR_MAX) != ev->u.ullval) { return 0; @@ -1426,9 +1329,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->u.cval = (char) ev->u.ullval; ev->et = AST_Expression::EV_char; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_bool: ev->u.cval = (char) ev->u.bval; ev->et = AST_Expression::EV_char; @@ -1519,7 +1419,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_wchar; return ev; case AST_Expression::EV_longlong: -#if ! defined (ACE_LACKS_LONGLONG_T) if (ev->u.llval > (ACE_CDR::LongLong) ACE_WCHAR_MAX || ev->u.llval < 0) { @@ -1529,11 +1428,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->u.wcval = (ACE_CDR::WChar) ev->u.llval; ev->et = AST_Expression::EV_wchar; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_ulonglong: -#if ! defined (ACE_LACKS_LONGLONG_T) if ((ev->u.ullval & ACE_WCHAR_MAX) != ev->u.ullval ) { return 0; @@ -1542,9 +1437,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->u.wcval = (ACE_CDR::WChar) ev->u.ullval; ev->et = AST_Expression::EV_wchar; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_bool: ev->u.wcval = (ACE_CDR::WChar) ev->u.bval; ev->et = AST_Expression::EV_wchar; @@ -1636,7 +1528,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->et = AST_Expression::EV_octet; return ev; case AST_Expression::EV_longlong: -#if ! defined (ACE_LACKS_LONGLONG_T) if (ev->u.llval < 0 || ev->u.llval > (ACE_CDR::LongLong) ACE_OCTET_MAX) { @@ -1646,11 +1537,7 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->u.oval = (unsigned char) ev->u.llval; ev->et = AST_Expression::EV_octet; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_ulonglong: -#if ! defined (ACE_LACKS_LONGLONG_T) if ((ev->u.ullval & ACE_OCTET_MAX) != ev->u.ullval) { return 0; @@ -1659,9 +1546,6 @@ coerce_value (AST_Expression::AST_ExprValue *ev, ev->u.oval = (unsigned char) ev->u.ullval; ev->et = AST_Expression::EV_octet; return ev; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_bool: ev->u.oval = (unsigned char) ((ev->u.bval == false) ? 1 : 0); ev->et = AST_Expression::EV_octet; @@ -1853,14 +1737,12 @@ eval_kind (AST_Expression::AST_ExprValue *ev, AST_Expression::EvalKind ek) case AST_Expression::EK_ulong: retval = coerce_value (newval, AST_Expression::EV_ulong); break; -#if ! defined (ACE_LACKS_LONGLONG_T) case AST_Expression::EK_longlong: retval = coerce_value (newval, AST_Expression::EV_longlong); break; case AST_Expression::EK_ulonglong: retval = coerce_value (newval, AST_Expression::EV_ulonglong); break; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EK_octet: retval = coerce_value (newval, AST_Expression::EV_octet); break; @@ -1919,7 +1801,6 @@ AST_Expression::eval_bin_op (AST_Expression::EvalKind ek) AST_ExprValue, 0); -#if !defined (ACE_LACKS_LONGLONG_T) if (ek == EK_ulonglong) { this->pd_v1->set_ev (this->pd_v1->coerce (EV_ulonglong)); @@ -1995,7 +1876,6 @@ AST_Expression::eval_bin_op (AST_Expression::EvalKind ek) } } else -#endif { this->pd_v1->set_ev (this->pd_v1->coerce (EV_double)); this->pd_v2->set_ev (this->pd_v2->coerce (EV_double)); @@ -2060,7 +1940,6 @@ AST_Expression::eval_mod_op (AST_Expression::EvalKind ek) AST_ExprValue, 0); -#if !defined (ACE_LACKS_LONGLONG_T) if (ek == EK_ulonglong) { this->pd_v1->set_ev (this->pd_v1->coerce (EV_ulonglong)); @@ -2094,7 +1973,6 @@ AST_Expression::eval_mod_op (AST_Expression::EvalKind ek) this->pd_v1->ev ()->u.llval % this->pd_v2->ev ()->u.llval; } else -#endif if (ek == EK_ulong) { this->pd_v1->set_ev (this->pd_v1->coerce (EV_ulong)); @@ -2164,7 +2042,6 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek) switch (ek) { -#if !defined (ACE_LACKS_LONGLONG_T) case EK_ulonglong: { this->pd_v1->set_ev (this->pd_v1->coerce (EV_ulonglong)); @@ -2237,7 +2114,6 @@ AST_Expression::eval_bit_op (AST_Expression::EvalKind ek) } break; -#endif /* !defined (ACE_LACKS_LONGLONG_T) */ case EK_ulong: { this->pd_v1->set_ev (this->pd_v1->coerce (EV_ulong)); @@ -2555,7 +2431,6 @@ AST_Expression::eval_un_op (AST_Expression::EvalKind ek) retval->et = EV_ulong; retval->u.ulval = ~this->pd_v1->ev ()->u.ulval; break; -#if ! defined (ACE_LACKS_LONGLONG_T) case EV_longlong: retval->et = EV_longlong; retval->u.llval = ~this->pd_v1->ev ()->u.llval; @@ -2564,7 +2439,6 @@ AST_Expression::eval_un_op (AST_Expression::EvalKind ek) retval->et = EV_ulonglong; retval->u.ullval = ~this->pd_v1->ev ()->u.ullval; break; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case EV_octet: retval->et = EV_octet; retval->u.oval = ~this->pd_v1->ev ()->u.oval; @@ -2744,14 +2618,12 @@ AST_Expression::coerce (AST_Expression::ExprType t) case EV_ulong: tmp = this->eval_internal (EK_ulong); break; -#if ! defined (ACE_LACKS_LONGLONG_T) case EV_longlong: tmp = this->eval_internal (EK_longlong); break; case EV_ulonglong: tmp = this->eval_internal (EK_ulonglong); break; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case EV_octet: tmp = this->eval_internal (EK_octet); break; @@ -2805,23 +2677,11 @@ AST_Expression::coerce (AST_Expression::ExprType t) copy->u.ulval = this->pd_ev->u.ulval; break; case EV_longlong: -#if ! defined (ACE_LACKS_LONGLONG_T) copy->u.llval = this->pd_ev->u.llval; break; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - delete copy; - copy = 0; - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case EV_ulonglong: -#if ! defined (ACE_LACKS_LONGLONG_T) copy->u.ullval = this->pd_ev->u.ullval; break; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - delete copy; - copy = 0; - return 0; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case EV_bool: copy->u.bval = this->pd_ev->u.bval; break; @@ -3010,17 +2870,9 @@ AST_Expression::operator== (AST_Expression *vc) } case EV_longlong: -#if ! defined (ACE_LACKS_LONGLONG_T) return pd_ev->u.llval == vc->ev ()->u.llval ? true : false; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return false; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case EV_ulonglong: -#if ! defined (ACE_LACKS_LONGLONG_T) return pd_ev->u.ullval == vc->ev()->u.ullval ? true : false; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return false; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case EV_longdouble: case EV_wstring: case EV_enum: @@ -3099,17 +2951,9 @@ AST_Expression::compare (AST_Expression *vc) } case EV_longlong: -#if ! defined (ACE_LACKS_LONGLONG_T) return this->pd_ev->u.llval == vc->ev ()->u.llval ? true : false; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return false; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case EV_ulonglong: -#if ! defined (ACE_LACKS_LONGLONG_T) return this->pd_ev->u.ullval == vc->ev ()->u.ullval ? true : false; -#else /* ! defined (ACE_LACKS_LONGLONG_T) */ - return false; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ case EV_longdouble: case EV_wstring: case EV_enum: @@ -3208,14 +3052,10 @@ dump_expr_val (ACE_OSTREAM_TYPE &o, if (ev->u.strval != 0) ev->u.strval->dump(o); case AST_Expression::EV_longlong: -#if ! defined (ACE_LACKS_LONGLONG_T) // o << ev->u.llval; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ break; case AST_Expression::EV_ulonglong: -#if ! defined (ACE_LACKS_LONGLONG_T) // o << ev->u.ullval; -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ break; case AST_Expression::EV_longdouble: case AST_Expression::EV_wstring: diff --git a/TAO/TAO_IDL/ast/ast_union.cpp b/TAO/TAO_IDL/ast/ast_union.cpp index 48eaee7214e..fe4687fe00c 100644 --- a/TAO/TAO_IDL/ast/ast_union.cpp +++ b/TAO/TAO_IDL/ast/ast_union.cpp @@ -825,7 +825,6 @@ AST_Union::compute_default_value (void) break; case AST_Expression::EV_longlong: -#if ! defined (ACE_LACKS_LONGLONG_T) if (this->default_value_.u.longlong_val == expr->ev ()->u.llval) { @@ -834,9 +833,7 @@ AST_Union::compute_default_value (void) } break; -#endif case AST_Expression::EV_ulonglong: -#if ! defined (ACE_LACKS_LONGLONG_T) if (this->default_value_.u.ulonglong_val == expr->ev ()->u.ullval) { @@ -845,7 +842,6 @@ AST_Union::compute_default_value (void) } break; -#endif default: // Error. break; diff --git a/TAO/TAO_IDL/be/be_helper.cpp b/TAO/TAO_IDL/be/be_helper.cpp index 523e0eba06b..2ca72a347f2 100644 --- a/TAO/TAO_IDL/be/be_helper.cpp +++ b/TAO/TAO_IDL/be/be_helper.cpp @@ -533,9 +533,6 @@ TAO_OutStream::print (AST_Expression *expr) case AST_Expression::EV_ulong: this->TAO_OutStream::print (ACE_UINT32_FORMAT_SPECIFIER_ASCII "%c", ev->u.ulval, 'U'); break; - // The ACE_LACKS_LONGLONG_T guards have been removed around - // the next 2 cases since the macros now used should work - // whether native 64-bit integers are defined or not. case AST_Expression::EV_longlong: this->TAO_OutStream::print ("ACE_INT64_LITERAL ("); this->TAO_OutStream::print (ACE_INT64_FORMAT_SPECIFIER_ASCII, diff --git a/TAO/TAO_IDL/fe/y.tab.cpp b/TAO/TAO_IDL/fe/y.tab.cpp index 7688d2ffabd..9aae1199c4a 100644 --- a/TAO/TAO_IDL/fe/y.tab.cpp +++ b/TAO/TAO_IDL/fe/y.tab.cpp @@ -4760,7 +4760,6 @@ tao_yyreduce: } break; -#if !defined (ACE_LACKS_LONGLONG_T) case AST_Expression::EV_ulonglong: if (ev->u.ullval == 0) { @@ -4768,7 +4767,6 @@ tao_yyreduce: } break; -#endif case AST_Expression::EV_octet: if (ev->u.oval == 0) { diff --git a/TAO/TAO_IDL/include/ast_expression.h b/TAO/TAO_IDL/include/ast_expression.h index faf9e6c72a8..fd6daa5fba9 100644 --- a/TAO/TAO_IDL/include/ast_expression.h +++ b/TAO/TAO_IDL/include/ast_expression.h @@ -169,11 +169,7 @@ public: ACE_CDR::ULong ulval; // Contains unsigned long expr value. ACE_CDR::Boolean bval; // Contains boolean expression value. ACE_CDR::LongLong llval; // Contains long long expr value. -#if defined (ACE_LACKS_UNSIGNEDLONGLONG_T) && ! defined (ACE_LACKS_LONGLONG_T) - ACE_CDR::LongLong ullval; // Contains unsigned long long expr value -#elif ! defined (ACE_LACKS_LONGLONG_T) ACE_CDR::ULongLong ullval; // Contains unsigned long long expr value. -#endif /* defined (ACE_LACKS_UNSIGNEDLONGLONG_T) && ! defined (ACE_LACKS_LONGLONG_T) */ ACE_CDR::Float fval; // Contains 32-bit float expr value. ACE_CDR::Double dval; // Contains 64-bit float expr value. ACE_CDR::Char cval; // Contains char expression value. diff --git a/TAO/examples/RTCORBA/Activity/Task_Stats.cpp b/TAO/examples/RTCORBA/Activity/Task_Stats.cpp index a17b0056c27..5e19a190441 100644 --- a/TAO/examples/RTCORBA/Activity/Task_Stats.cpp +++ b/TAO/examples/RTCORBA/Activity/Task_Stats.cpp @@ -113,74 +113,30 @@ Task_Stats::dump_latency_stats ( ACE_UINT64 avg = this->sum_ / this->samples_count_; ACE_UINT64 dev = -#if defined ACE_LACKS_LONGLONG_T - static_cast<ACE_U_LongLong> (this->sum2_ / this->samples_count_) - - avg * ACE_U64_TO_U32(avg); -#else /* ! ACE_LACKS_LONGLONG_T */ - this->sum2_ / this->samples_count_ - avg * avg; -#endif /* ! ACE_LACKS_LONGLONG_T */ - - ACE_UINT64 l_min_ = this->exec_time_min_ / sf; - ACE_UINT32 l_min = ACE_CU64_TO_CU32 (l_min_); - - ACE_UINT64 l_max_ = this->exec_time_max_ / sf; - ACE_UINT32 l_max = ACE_CU64_TO_CU32 (l_max_); - - /* - ACE_UINT64 l_avg_ = avg / sf; - ACE_UINT32 l_avg = ACE_CU64_TO_CU32 (l_avg_); - - ACE_UINT64 l_dev_ = dev / sf; - ACE_UINT32 l_dev = ACE_CU64_TO_CU32 (l_dev_); - */ - - double l_avg = avg / sf; - double l_dev = dev / (sf * sf); - - ACE_UINT64 tmin_ = this->time_inv_[0] / sf; - ACE_UINT32 tmin = ACE_CU64_TO_CU32 (tmin_); - - ACE_UINT64 tmax_ = this->time_inv_[samples_count_-1] / sf; - ACE_UINT32 tmax = ACE_CU64_TO_CU32 (tmax_); - - ACE_OS::sprintf(out_msg, - ACE_TEXT ("#latency : %u[%d]/%.2f/%u[%d]/%.2f (min/avg/max/var^2)\n #first invocation time = %u, last invocation time = %u\n"), - l_min, this->exec_time_min_at_, - l_avg, - l_max, this->exec_time_max_at_, - l_dev, - tmin,tmax); - /* - double l_min = ACE_CU64_TO_CU32 (this->exec_time_min_) / sf; - double l_max = ACE_CU64_TO_CU32 (this->exec_time_max_) / sf; - double l_avg = ACE_CU64_TO_CU32 (avg) / sf; - double l_dev = ACE_CU64_TO_CU32 (dev) / (sf * sf); - - double tmin = ACE_CU64_TO_CU32 (this->time_inv_[0])/sf; - double tmax = ACE_CU64_TO_CU32 (this->time_inv_[samples_count_-1])/sf; + this->sum2_ / this->samples_count_ - avg * avg; - ACE_OS::sprintf(out_msg, - ACE_TEXT ("#latency : %.2f[%d]/%.2f/%.2f[%d]/%.2f (min/avg/max/var^2)\n #first invocation time = %.0f, last invocation time = %.0f\n"), - l_min, this->exec_time_min_at_, - l_avg, - l_max, this->exec_time_max_at_, - l_dev, - tmin,tmax); + ACE_UINT64 l_min_ = this->exec_time_min_ / sf; + ACE_UINT32 l_min = ACE_CU64_TO_CU32 (l_min_); + + ACE_UINT64 l_max_ = this->exec_time_max_ / sf; + ACE_UINT32 l_max = ACE_CU64_TO_CU32 (l_max_); + + double l_avg = ACE_UINT64_DBLCAST_ADAPTER(avg) / sf; + double l_dev = ACE_UINT64_DBLCAST_ADAPTER(dev) / (sf * sf); + + ACE_UINT64 tmin_ = this->time_inv_[0] / sf; + ACE_UINT32 tmin = ACE_CU64_TO_CU32 (tmin_); + ACE_UINT64 tmax_ = this->time_inv_[samples_count_-1] / sf; + ACE_UINT32 tmax = ACE_CU64_TO_CU32 (tmax_); ACE_OS::sprintf(out_msg, - ACE_TEXT ("#latency : %.2f[%d]/%.2f/%.2f[%d]/%.2f (min/avg/max/var^2)\n"), - l_min, this->exec_time_min_at_, - l_avg, - l_max, this->exec_time_max_at_, - l_dev); - - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("#latency : %.2f[%d]/%.2f/%.2f[%d]/%.2f (min/avg/max/var^2)\n"), - l_min, this->exec_time_min_at_, - l_avg, - l_max, this->exec_time_max_at_, - l_dev)); - */ + ACE_TEXT ("#latency : %u[%d]/%.2f/%u[%d]/%.2f (min/avg/max/var^2)\n #first invocation time = %u, last invocation time = %u\n"), + l_min, this->exec_time_min_at_, + l_avg, + l_max, this->exec_time_max_at_, + l_dev, + tmin,tmax); } #if defined (ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION) diff --git a/TAO/examples/RTCORBA/Activity/Task_Stats.inl b/TAO/examples/RTCORBA/Activity/Task_Stats.inl index 78ce13d05bc..d33143d59dd 100644 --- a/TAO/examples/RTCORBA/Activity/Task_Stats.inl +++ b/TAO/examples/RTCORBA/Activity/Task_Stats.inl @@ -27,11 +27,7 @@ Task_Stats::sample (ACE_UINT64 inv_start_time, ACE_UINT64 inv_end_time) this->exec_time_max_ = exec_value; this->exec_time_max_at_ = this->samples_count_; this->sum_ = exec_value; -#if defined ACE_LACKS_LONGLONG_T - this->sum2_ = exec_value * ACE_U64_TO_U32 (exec_value); -#else /* ! ACE_LACKS_LONGLONG_T */ this->sum2_ = exec_value * exec_value; -#endif /* ! ACE_LACKS_LONGLONG_T */ } else { @@ -47,11 +43,7 @@ Task_Stats::sample (ACE_UINT64 inv_start_time, ACE_UINT64 inv_end_time) } this->sum_ += exec_value; -#if defined ACE_LACKS_LONGLONG_T - this->sum2_ += exec_value * ACE_U64_TO_U32 (exec_value); -#else /* ! ACE_LACKS_LONGLONG_T */ this->sum2_ += exec_value * exec_value; -#endif /* ! ACE_LACKS_LONGLONG_T */ } return 0; } diff --git a/TAO/examples/RTCORBA/Activity/Thread_Task.cpp b/TAO/examples/RTCORBA/Activity/Thread_Task.cpp index 350e828d82a..b24193a1d2c 100644 --- a/TAO/examples/RTCORBA/Activity/Thread_Task.cpp +++ b/TAO/examples/RTCORBA/Activity/Thread_Task.cpp @@ -107,16 +107,8 @@ Thread_Task::svc (void) if (period_ != 0) // blast mode, no sleep. { // convert to microseconds -#if !defined ACE_LACKS_LONGLONG_T - ACE_UINT32 elapsed_microseconds = ACE_UINT32((after - before) / gsf); -#else /* ! ACE_LACKS_LONGLONG_T */ - - ACE_UINT32 elapsed_microseconds = (after - before) / gsf; - -#endif /* ! ACE_LACKS_LONGLONG_T */ - #if defined (ACE_WIN32) elapsed_microseconds*=1000; // convert to uSec on Win32 #endif /* ACE_WIN32 */ diff --git a/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp b/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp index 2567e4af055..f40deb210c4 100644 --- a/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp +++ b/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp @@ -2628,14 +2628,12 @@ ifr_adding_visitor::load_any (AST_Expression::AST_ExprValue *ev, case AST_Expression::EV_ulong: any <<= static_cast<CORBA::ULong> (ev->u.ulval); break; -#if !defined (ACE_LACKS_LONGLONG_T) case AST_Expression::EV_longlong: any <<= ev->u.llval; break; case AST_Expression::EV_ulonglong: any <<= ev->u.ullval; break; -#endif /* !defined (ACE_LACKS_LONGLONG_T) */ case AST_Expression::EV_float: any <<= ev->u.fval; break; diff --git a/TAO/orbsvcs/examples/Log/Basic/TLS_Client.cpp b/TAO/orbsvcs/examples/Log/Basic/TLS_Client.cpp index b5fac6be20a..291d307e3e5 100644 --- a/TAO/orbsvcs/examples/Log/Basic/TLS_Client.cpp +++ b/TAO/orbsvcs/examples/Log/Basic/TLS_Client.cpp @@ -103,21 +103,13 @@ TLS_Client::run_tests (void) ACE_DEBUG ((LM_DEBUG, "Calling BasicLog::get_n_records...\n")); -#ifndef ACE_LACKS_LONGLONG_T CORBA::ULongLong retval = basic_log->get_n_records (); -#else - CORBA::Long retval = basic_log->get_n_records ().lo(); -#endif ACE_DEBUG ((LM_DEBUG, "Number of records in Log = %d\n", retval)); ACE_DEBUG ((LM_DEBUG, "Calling BasicLog::get_current_size...\n")); -#ifndef ACE_LACKS_LONGLONG_T retval = basic_log->get_current_size (); -#else - retval = basic_log->get_current_size ().lo(); -#endif ACE_DEBUG ((LM_DEBUG, "Size of data in Log = %d\n", retval)); @@ -128,17 +120,10 @@ TLS_Client::run_tests (void) CORBA::ULong j = 0; for (; j < rec_list->length();++j) //dhanvey added info -#ifndef ACE_LACKS_LONGLONG_T ACE_DEBUG ((LM_DEBUG, "id = %Q, time= %Q\n", rec_list[j].id, rec_list[j].time)); -#else - ACE_DEBUG ((LM_DEBUG, - "id = %u, time= %u\n", - rec_list[j].id.lo(), rec_list[j].time.lo())); -#endif - ACE_DEBUG ((LM_DEBUG, "Deleting records...\n")); @@ -146,21 +131,13 @@ TLS_Client::run_tests (void) ACE_DEBUG ((LM_DEBUG, "Calling BasicLog::get_n_records...\n")); -#ifndef ACE_LACKS_LONGLONG_T retval = basic_log->get_n_records (); -#else - retval = basic_log->get_n_records ().lo(); -#endif ACE_DEBUG ((LM_DEBUG, "Number of records in Log after delete = %d\n", retval)); ACE_DEBUG ((LM_DEBUG, "Geting the current_size again...\n")); -#ifndef ACE_LACKS_LONGLONG_T retval = basic_log->get_current_size (); -#else - retval = basic_log->get_current_size ().lo(); -#endif ACE_DEBUG ((LM_DEBUG, "Size of data in Log = %d\n", retval)); diff --git a/TAO/orbsvcs/examples/Log/Event/Event_Supplier.cpp b/TAO/orbsvcs/examples/Log/Event/Event_Supplier.cpp index c6663a74cb2..e3e738174a8 100644 --- a/TAO/orbsvcs/examples/Log/Event/Event_Supplier.cpp +++ b/TAO/orbsvcs/examples/Log/Event/Event_Supplier.cpp @@ -114,21 +114,13 @@ Supplier::run (int argc, ACE_TCHAR* argv[]) ACE_DEBUG ((LM_DEBUG, "Calling EventLog::get_n_records...\n")); -#ifndef ACE_LACKS_LONGLONG_T CORBA::ULongLong retval = event_log->get_n_records (); -#else - CORBA::Long retval = event_log->get_n_records ().lo(); -#endif ACE_DEBUG ((LM_DEBUG, "Number of records in Log = %d\n", retval)); ACE_DEBUG ((LM_DEBUG, "Calling EventLog::get_current_size...\n")); -#ifndef ACE_LACKS_LONGLONG_T retval = event_log->get_current_size (); -#else - retval = event_log->get_current_size ().lo(); -#endif ACE_DEBUG ((LM_DEBUG, "Size of data in Log = %d\n", retval)); @@ -139,15 +131,9 @@ Supplier::run (int argc, ACE_TCHAR* argv[]) CORBA::ULong j = 0; for (; j < rec_list->length();++j) -#ifndef ACE_LACKS_LONGLONG_T ACE_DEBUG ((LM_DEBUG, "id = %Q, time= %Q\n", rec_list[j].id, rec_list[j].time)); -#else - ACE_DEBUG ((LM_DEBUG, - "id = %u, time= %u\n", - rec_list[j].id.lo(), rec_list[j].time.lo())); -#endif ACE_DEBUG ((LM_DEBUG, "Deleting records...\n")); @@ -156,21 +142,13 @@ Supplier::run (int argc, ACE_TCHAR* argv[]) ACE_DEBUG ((LM_DEBUG, "Calling EventLog::get_n_records...\n")); -#ifndef ACE_LACKS_LONGLONG_T retval = event_log->get_n_records (); -#else - retval = event_log->get_n_records ().lo(); -#endif ACE_DEBUG ((LM_DEBUG, "Number of records in Log after delete = %d\n", retval)); ACE_DEBUG ((LM_DEBUG, "Geting the current_size again...\n")); -#ifndef ACE_LACKS_LONGLONG_T retval = event_log->get_current_size (); -#else - retval = event_log->get_current_size ().lo(); -#endif ACE_DEBUG ((LM_DEBUG, "Size of data in Log = %d\n", retval)); diff --git a/TAO/orbsvcs/examples/Log/Notify/Notify_Supplier.cpp b/TAO/orbsvcs/examples/Log/Notify/Notify_Supplier.cpp index 60f2323abe7..637faeeea69 100644 --- a/TAO/orbsvcs/examples/Log/Notify/Notify_Supplier.cpp +++ b/TAO/orbsvcs/examples/Log/Notify/Notify_Supplier.cpp @@ -184,21 +184,13 @@ Supplier::run (int argc, ACE_TCHAR* argv[]) ACE_DEBUG ((LM_DEBUG, "Calling NotifyLog get_n_records...\n")); -#ifndef ACE_LACKS_LONGLONG_T CORBA::ULongLong retval = notify_log_->get_n_records (); -#else - CORBA::Long retval = notify_log_->get_n_records ().lo(); -#endif ACE_DEBUG ((LM_DEBUG, "Number of records in Log = %d\n", retval)); ACE_DEBUG ((LM_DEBUG, "Calling NotifyLog::get_current_size...\n")); -#ifndef ACE_LACKS_LONGLONG_T retval = notify_log_->get_current_size (); -#else - retval = notify_log_->get_current_size ().lo(); -#endif ACE_DEBUG ((LM_DEBUG, "Size of data in Log = %d\n", retval)); @@ -209,15 +201,9 @@ Supplier::run (int argc, ACE_TCHAR* argv[]) CORBA::ULong j = 0; for (; j < rec_list->length();++j) -#ifndef ACE_LACKS_LONGLONG_T - ACE_DEBUG ((LM_DEBUG, + ACE_DEBUG ((LM_DEBUG, "id = %Q, time= %Q\n", rec_list[j].id, rec_list[j].time)); -#else - ACE_DEBUG ((LM_DEBUG, - "id = %u, time= %u\n", - rec_list[j].id.lo(), rec_list[j].time.lo())); -#endif ACE_DEBUG ((LM_DEBUG, "Deleting records...\n")); @@ -226,21 +212,13 @@ Supplier::run (int argc, ACE_TCHAR* argv[]) ACE_DEBUG ((LM_DEBUG, "Calling NotifyLog::get_n_records...\n")); -#ifndef ACE_LACKS_LONGLONG_T retval = notify_log_->get_n_records (); -#else - retval = notify_log_->get_n_records ().lo(); -#endif ACE_DEBUG ((LM_DEBUG, "Number of records in Log after delete = %d\n", retval)); ACE_DEBUG ((LM_DEBUG, "Geting the current_size again...\n")); -#ifndef ACE_LACKS_LONGLONG_T retval = notify_log_->get_current_size (); -#else - retval = notify_log_->get_current_size ().lo(); -#endif ACE_DEBUG ((LM_DEBUG, "Size of data in Log = %d\n", retval)); diff --git a/TAO/orbsvcs/examples/Log/RTEvent/RTEvent_Supplier.cpp b/TAO/orbsvcs/examples/Log/RTEvent/RTEvent_Supplier.cpp index 191092bb109..5e77fc75820 100644 --- a/TAO/orbsvcs/examples/Log/RTEvent/RTEvent_Supplier.cpp +++ b/TAO/orbsvcs/examples/Log/RTEvent/RTEvent_Supplier.cpp @@ -162,21 +162,13 @@ Supplier::run (int argc, ACE_TCHAR* argv[]) ACE_DEBUG ((LM_DEBUG, "Calling EventLog::get_n_records...\n")); -#ifndef ACE_LACKS_LONGLONG_T CORBA::ULongLong retval = event_log->get_n_records (); -#else - CORBA::Long retval = event_log->get_n_records ().lo(); -#endif ACE_DEBUG ((LM_DEBUG, "Number of records in Log = %d\n", retval)); ACE_DEBUG ((LM_DEBUG, "Calling EventLog::get_current_size...\n")); -#ifndef ACE_LACKS_LONGLONG_T retval = event_log->get_current_size (); -#else - retval = event_log->get_current_size ().lo(); -#endif ACE_DEBUG ((LM_DEBUG, "Size of data in Log = %d\n", retval)); @@ -187,15 +179,9 @@ Supplier::run (int argc, ACE_TCHAR* argv[]) CORBA::ULong j = 0; for (; j < rec_list->length();++j) -#ifndef ACE_LACKS_LONGLONG_T ACE_DEBUG ((LM_DEBUG, "id = %Q, time= %Q\n", rec_list[j].id, rec_list[j].time)); -#else - ACE_DEBUG ((LM_DEBUG, - "id = %u, time= %u\n", - rec_list[j].id.lo(), rec_list[j].time.lo())); -#endif ACE_DEBUG ((LM_DEBUG, "Deleting records...\n")); @@ -204,21 +190,13 @@ Supplier::run (int argc, ACE_TCHAR* argv[]) ACE_DEBUG ((LM_DEBUG, "Calling EventLog::get_n_records...\n")); -#ifndef ACE_LACKS_LONGLONG_T retval = event_log->get_n_records (); -#else - retval = event_log->get_n_records ().lo(); -#endif ACE_DEBUG ((LM_DEBUG, "Number of records in Log after delete = %d\n", retval)); ACE_DEBUG ((LM_DEBUG, "Geting the current_size again...\n")); -#ifndef ACE_LACKS_LONGLONG_T retval = event_log->get_current_size (); -#else - retval = event_log->get_current_size ().lo(); -#endif ACE_DEBUG ((LM_DEBUG, "Size of data in Log = %d\n", retval)); diff --git a/TAO/orbsvcs/orbsvcs/IFRService/Container_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/Container_i.cpp index 722f0a39605..e098e38e599 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/Container_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/Container_i.cpp @@ -2180,7 +2180,6 @@ TAO_Container_i::store_label (ACE_Configuration_Section_Key key, result = static_cast<u_int> (x); break; } -#if !defined (ACE_LACKS_LONGLONG_T) case CORBA::tk_longlong: { CORBA::LongLong x; @@ -2189,8 +2188,6 @@ TAO_Container_i::store_label (ACE_Configuration_Section_Key key, result = static_cast<u_int> (x); break; } -#endif /* ACE_LACKS_LONGLONG_T */ -#if !(defined (ACE_LACKS_LONGLONG_T) || defined (ACE_LACKS_UNSIGNEDLONGLONG_T)) case CORBA::tk_ulonglong: { CORBA::ULongLong x; @@ -2199,7 +2196,6 @@ TAO_Container_i::store_label (ACE_Configuration_Section_Key key, result = static_cast<u_int> (x); break; } -#endif case CORBA::tk_enum: { CORBA::ULong x; diff --git a/TAO/orbsvcs/orbsvcs/IFRService/UnionDef_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/UnionDef_i.cpp index b8f7c8693fe..c4adc184db2 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/UnionDef_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/UnionDef_i.cpp @@ -403,11 +403,9 @@ TAO_UnionDef_i::fetch_label (const ACE_Configuration_Section_Key member_key, case CORBA::tk_ulong: member.label <<= static_cast<CORBA::ULong> (value); break; -#if !defined (ACE_LACKS_LONGLONG_T) case CORBA::tk_longlong: member.label <<= static_cast<CORBA::LongLong> (value); break; -#endif /* ACE_LACKS_LONGLONG_T */ case CORBA::tk_ulonglong: member.label <<= static_cast<CORBA::ULongLong> (value); break; diff --git a/TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp b/TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp index cbd7728ff8b..6b3b97fca88 100644 --- a/TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp +++ b/TAO/orbsvcs/orbsvcs/Log/Hash_LogRecordStore.cpp @@ -136,17 +136,10 @@ TAO_Hash_LogRecordStore::log (const DsLogAdmin::LogRecord &const_rec) // First, bind the id to the LogRecord in the hash_map if (this->rec_map_.bind (rec.id, rec) != 0) { -#if defined (ACE_LACKS_LONGLONG_T) - ACE_ERROR_RETURN ((LM_ERROR, - "LogRecordStore (%P|%t):Failed to bind %d in the hash map\n", - ACE_U64_TO_U32(rec.id)), - -1); -#else ACE_ERROR_RETURN ((LM_ERROR, "LogRecordStore (%P|%t):Failed to bind %Q in the hash map\n", rec.id), -1); -#endif } // Increment the number of records in the log @@ -384,15 +377,9 @@ TAO_Hash_LogRecordStore::query_i (const char *constraint, { if (TAO_debug_level > 0) { -#if defined (ACE_LACKS_LONGLONG_T) - ACE_DEBUG ((LM_DEBUG,"Matched constraint! d = %d, Time = %d\n", - ACE_U64_TO_U32 (iter->item ().id), - ACE_U64_TO_U32 (iter->item ().time))); -#else ACE_DEBUG ((LM_DEBUG,"Matched constraint! d = %Q, Time = %Q\n", iter->item ().id, iter->item ().time)); -#endif } (*rec_list)[count] = iter->item (); @@ -455,15 +442,9 @@ TAO_Hash_LogRecordStore::retrieve (DsLogAdmin::TimeT from_time, char constraint[32]; ACE_TCHAR uint64_formating[32]; -#if defined (ACE_LACKS_LONGLONG_T) - ACE_OS::sprintf (uint64_formating, - "%u", - ACE_U64_TO_U32 (from_time)); -#else ACE_OS::sprintf (uint64_formating, ACE_UINT64_FORMAT_SPECIFIER, from_time); -#endif if (how_many >= 0) ACE_OS::sprintf (constraint, "time >= %s", diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.cpp b/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.cpp index b59b3f57166..c28f9be15c7 100644 --- a/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.cpp +++ b/TAO/orbsvcs/orbsvcs/Log/Log_Constraint_Visitors.cpp @@ -22,20 +22,12 @@ TAO_Log_Constraint_Visitor::TAO_Log_Constraint_Visitor (const DsLogAdmin::LogRec : property_lookup_ (property_lookup_size_) { CORBA::Any val_id; -#if defined (ACE_LACKS_LONGLONG_T) || defined (ACE_LACKS_UNSIGNEDLONGLONG_T) - val_id <<= ACE_U64_TO_U32 (rec.id); -#else val_id <<= static_cast<ACE_UINT32> (rec.id); -#endif this->property_lookup_.bind (ACE_CString("id", 0, false), val_id); CORBA::Any val_time; -#if defined (ACE_LACKS_LONGLONG_T) || defined (ACE_LACKS_UNSIGNEDLONGLONG_T) - val_time <<= ACE_U64_TO_U32 (rec.time); -#else val_time <<= static_cast<ACE_UINT32> (rec.time); -#endif this->property_lookup_.bind (ACE_CString ("time", 0, false), val_time); this->property_lookup_.bind (ACE_CString ("info", 0, false), rec.info); diff --git a/TAO/orbsvcs/orbsvcs/Notify/Name_Value_Pair.cpp b/TAO/orbsvcs/orbsvcs/Notify/Name_Value_Pair.cpp index 8fda09e37df..5f010a942bf 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Name_Value_Pair.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Name_Value_Pair.cpp @@ -59,11 +59,7 @@ namespace TAO_Notify { ACE_TCHAR buf[128]; ACE_UINT64 us = p.value(); -#ifdef ACE_LACKS_LONGLONG_T - us.as_string(buf); -#else ACE_OS::sprintf(buf, ACE_UINT64_FORMAT_SPECIFIER, us); -#endif /* ACE_LACKS_LONGLONG_T */ value = ACE_TEXT_ALWAYS_CHAR (buf); } diff --git a/TAO/orbsvcs/orbsvcs/Notify/XML_Saver.cpp b/TAO/orbsvcs/orbsvcs/Notify/XML_Saver.cpp index a3468558fa4..2e3f883571f 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/XML_Saver.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/XML_Saver.cpp @@ -126,11 +126,7 @@ namespace TAO_Notify nowus += tmpus * USECSPERSEC; ACE_TCHAR nowusstr[128]; -#ifdef ACE_LACKS_LONGLONG_T - nowus.as_string(nowusstr); -#else ACE_OS::sprintf(nowusstr, ACE_UINT64_FORMAT_SPECIFIER, nowus); -#endif /* ACE_LACKS_LONGLONG_T */ attrs.push_back(NVP("version", "1.0")); if (this->timestamp_) diff --git a/TAO/orbsvcs/orbsvcs/Time/Timer_Helper.cpp b/TAO/orbsvcs/orbsvcs/Time/Timer_Helper.cpp index 744860c67ff..52547a5d1b4 100644 --- a/TAO/orbsvcs/orbsvcs/Time/Timer_Helper.cpp +++ b/TAO/orbsvcs/orbsvcs/Time/Timer_Helper.cpp @@ -34,13 +34,7 @@ Timer_Helper::handle_timeout (const ACE_Time_Value &, // The following are used to keep a track of the inaccuracy // in synchronization. - -#if defined (ACE_LACKS_LONGLONG_T) - CORBA::ULongLong lowest_time (0xFFFFFFFF, 0xFFFFFFFF); -#else CORBA::ULongLong lowest_time = ACE_UINT64_LITERAL (0xFFFFFFFFFFFFFFFF); -#endif - CORBA::ULongLong highest_time = 0; try diff --git a/TAO/orbsvcs/orbsvcs/Time_Utilities.cpp b/TAO/orbsvcs/orbsvcs/Time_Utilities.cpp index 1bb51c844ab..17224e40735 100644 --- a/TAO/orbsvcs/orbsvcs/Time_Utilities.cpp +++ b/TAO/orbsvcs/orbsvcs/Time_Utilities.cpp @@ -11,12 +11,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL // Number of nanoseconds between CORBA and POSIX epochs. -#ifdef ACE_LACKS_LONGLONG_T -const ACE_UINT64 -ORBSVCS_Time::Time_Base_Offset(0x9e7d0000, 0x0A993A60F); -#else const ACE_UINT64 ORBSVCS_Time::Time_Base_Offset(ACE_UINT64_LITERAL(12219292800000000000)); -#endif TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/Receiver_Stats.cpp b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/Receiver_Stats.cpp index 5f85dccebff..504052e660f 100644 --- a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/Receiver_Stats.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/Receiver_Stats.cpp @@ -52,12 +52,7 @@ Receiver_Stats::dump_results (const ACE_TCHAR *msg, ACE_UINT64 avg = this->sum_ / this->samples_count_; ACE_UINT64 dev = -#if defined ACE_LACKS_LONGLONG_T - static_cast<ACE_U_LongLong> (this->sum2_ / this->samples_count_) - - avg * ACE_U64_TO_U32(avg); -#else /* ! ACE_LACKS_LONGLONG_T */ this->sum2_ / this->samples_count_ - avg * avg; -#endif /* ! ACE_LACKS_LONGLONG_T */ double l_min = ACE_CU64_TO_CU32 (this->min_) / sf; double l_max = ACE_CU64_TO_CU32 (this->max_) / sf; diff --git a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/Receiver_Stats.inl b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/Receiver_Stats.inl index b60f22d1dba..cb317ac779b 100644 --- a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/Receiver_Stats.inl +++ b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/Receiver_Stats.inl @@ -30,11 +30,7 @@ Receiver_Stats::sample (ACE_UINT64 value) this->max_ = value; this->max_at_ = this->samples_count_; this->sum_ = value; -#if defined ACE_LACKS_LONGLONG_T - this->sum2_ = value * ACE_U64_TO_U32 (value); -#else /* ! ACE_LACKS_LONGLONG_T */ this->sum2_ = value * value; -#endif /* ! ACE_LACKS_LONGLONG_T */ } else { @@ -50,10 +46,6 @@ Receiver_Stats::sample (ACE_UINT64 value) } this->sum_ += value; -#if defined ACE_LACKS_LONGLONG_T - this->sum2_ += value * ACE_U64_TO_U32 (value); -#else /* ! ACE_LACKS_LONGLONG_T */ this->sum2_ += value * value; -#endif /* ! ACE_LACKS_LONGLONG_T */ } } diff --git a/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/Admin_Client.cpp b/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/Admin_Client.cpp index 6c2b76df1e9..ad8c0363dd7 100644 --- a/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/Admin_Client.cpp +++ b/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/Admin_Client.cpp @@ -2109,16 +2109,9 @@ Admin_Client::constant_test (void) if (this->debug_) { -#if defined (ACE_LACKS_LONGLONG_T) - char buffer[32]; - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("ConstantDef::value (ulonglong): %C\n"), - out_ull_val.as_string (buffer))); -#else ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ConstantDef::value (ulonglong): %Q\n"), out_ull_val)); -#endif } ACE_TEST_ASSERT (out_ull_val == ull_val); diff --git a/TAO/orbsvcs/tests/Log/Basic_Log_Test/Basic_Log_Test.cpp b/TAO/orbsvcs/tests/Log/Basic_Log_Test/Basic_Log_Test.cpp index c6ad51dd4e8..208c4090294 100644 --- a/TAO/orbsvcs/tests/Log/Basic_Log_Test/Basic_Log_Test.cpp +++ b/TAO/orbsvcs/tests/Log/Basic_Log_Test/Basic_Log_Test.cpp @@ -174,17 +174,10 @@ BasicLog_Test::test_LogAction () ACE_DEBUG ((LM_DEBUG, "The log's full action successfully set to halt\n")); -#ifndef ACE_LACKS_LONGLONG_T ACE_DEBUG ((LM_INFO, "The current size %Q, max size %Q\n", basicLog_->get_current_size (), basicLog_->get_max_size())); -#else - ACE_DEBUG ((LM_DEBUG, - "The current size %u , max size %u\n", - basicLog_->get_current_size().lo (), - basicLog_->get_max_size().lo ())); -#endif // make sure that it is full and when writing this->write_records (0); @@ -253,15 +246,9 @@ int BasicLog_Test::display_records () CORBA::ULong j = 0; for (; j < rec_list->length();++j) //dhanvey added info -#ifndef ACE_LACKS_LONGLONG_T ACE_DEBUG ((LM_DEBUG, "id = %Q, time= %Q\n", rec_list[j].id, rec_list[j].time)); -#else - ACE_DEBUG ((LM_DEBUG, - "id = %u, time= %u\n", - rec_list[j].id.lo(), rec_list[j].time.lo())); -#endif return 0; @@ -275,11 +262,7 @@ int BasicLog_Test::write_records (CORBA::ULongLong numberOfRecords) numOfRecs = basicLog_->get_max_size(); } -#ifndef ACE_LACKS_LONGLONG_T ACE_DEBUG ((LM_INFO,"B_test: Write_records: Max size in bytes %Q.\n", numOfRecs)); -#else - ACE_DEBUG ((LM_INFO,"B_test: Write_records: currentsize in bytes %u.\n", numOfRecs.lo())); -#endif int i = 0; CORBA::ULongLong l = 0; @@ -326,13 +309,8 @@ int BasicLog_Test::write_records (CORBA::ULongLong numberOfRecords) } } -#ifndef ACE_LACKS_LONGLONG_T ACE_DEBUG ((LM_INFO,"B_test: Write_records: currentsize in bytes %Q.\n", basicLog_->get_current_size())); -#else - ACE_DEBUG ((LM_DEBUG,"B_test: Write_records: currentsize in bytes %u.\n", - basicLog_->get_current_size().lo())); -#endif //dhanvey CORBA::ULongLong nrecords = basicLog_->get_n_records(); @@ -640,18 +618,10 @@ BasicLog_Test::test_week_mask (void) int BasicLog_Test::delete_records (CORBA::ULongLong /* numberOfRecords */) { - -#ifndef ACE_LACKS_LONGLONG_T ACE_DEBUG ((LM_INFO, " before delete -- curr size %Q, max %Q\n", basicLog_->get_current_size (), basicLog_->get_max_size())); -#else - ACE_DEBUG ((LM_DEBUG, - "2ndThe current size %u , max size %u\n", - basicLog_->get_current_size().lo(), - basicLog_->get_max_size().lo())); -#endif CORBA::ULongLong nrecords = basicLog_->get_n_records (); @@ -666,17 +636,10 @@ int BasicLog_Test::delete_records (CORBA::ULongLong /* numberOfRecords */) "Number of records in Log after delete = %d\n", retVal)); -#ifndef ACE_LACKS_LONGLONG_T ACE_DEBUG ((LM_INFO, " after delete -- curr size %Q, max %Q\n", basicLog_->get_current_size (), basicLog_->get_max_size ())); -#else - ACE_DEBUG ((LM_DEBUG, - "2ndThe current size %u , max size %u\n", - basicLog_->get_current_size ().lo (), - basicLog_->get_max_size ().lo ())); -#endif nrecords = basicLog_->get_n_records (); diff --git a/TAO/orbsvcs/tests/Notify/lib/Task_Stats.cpp b/TAO/orbsvcs/tests/Notify/lib/Task_Stats.cpp index 9c9f59a115a..c9d1ee9c57b 100644 --- a/TAO/orbsvcs/tests/Notify/lib/Task_Stats.cpp +++ b/TAO/orbsvcs/tests/Notify/lib/Task_Stats.cpp @@ -112,13 +112,7 @@ Task_Stats::dump_samples (const ACE_TCHAR *file_name, const ACE_TCHAR *msg, int for (i = 0; i != this->samples_count_; ++i) { ACE_UINT64 diff = this->time_exec_[i] - this->mean_; - - ACE_UINT64 diff_sq = -#if defined ACE_LACKS_LONGLONG_T - diff * ACE_U64_TO_U32(diff); -#else /* ! ACE_LACKS_LONGLONG_T */ - diff * diff; -#endif /* ! ACE_LACKS_LONGLONG_T */ + ACE_UINT64 diff_sq = diff * diff; this->var_2_ += diff_sq; } diff --git a/TAO/orbsvcs/tests/Notify/lib/Task_Stats.inl b/TAO/orbsvcs/tests/Notify/lib/Task_Stats.inl index aed41117a3d..ba9526204cd 100644 --- a/TAO/orbsvcs/tests/Notify/lib/Task_Stats.inl +++ b/TAO/orbsvcs/tests/Notify/lib/Task_Stats.inl @@ -7,11 +7,7 @@ ACE_INLINE double Task_Stats::diff_sec (ACE_UINT64 before, ACE_UINT64 after) { double seconds = -#if defined ACE_LACKS_LONGLONG_T - (after - before) / gsf_; -#else /* ! ACE_LACKS_LONGLONG_T */ - static_cast<double> (ACE_UINT64_DBLCAST_ADAPTER((after - before) / gsf_)); -#endif /* ! ACE_LACKS_LONGLONG_T */ + static_cast<double> (ACE_UINT64_DBLCAST_ADAPTER((after - before) / gsf_)); seconds /= ACE_HR_SCALE_CONVERSION; return seconds; @@ -21,13 +17,7 @@ ACE_INLINE ACE_UINT32 Task_Stats::diff_usec (ACE_UINT64 before, ACE_UINT64 after) { // convert to microseconds - #if !defined ACE_LACKS_LONGLONG_T ACE_UINT32 elapsed_microseconds = ACE_UINT32((after - before) / gsf_); - #else /* ! ACE_LACKS_LONGLONG_T */ - - ACE_UINT32 elapsed_microseconds = (after - before) / gsf_; - - #endif /* ! ACE_LACKS_LONGLONG_T */ #if defined (ACE_WIN32) elapsed_microseconds*=1000; // convert to uSec on Win32 diff --git a/TAO/orbsvcs/tests/Notify/lib/common.cpp b/TAO/orbsvcs/tests/Notify/lib/common.cpp index 6e949457cbd..a7302904a08 100644 --- a/TAO/orbsvcs/tests/Notify/lib/common.cpp +++ b/TAO/orbsvcs/tests/Notify/lib/common.cpp @@ -41,11 +41,7 @@ Any_String (const CORBA::Any& any) } else if (any >>= ull) { -#if defined (ACE_LACKS_LONGLONG_T) - ACE_OS::strcpy (out, ull.as_string (out)); -#else ACE_OS::sprintf (out, ACE_UINT64_FORMAT_SPECIFIER_ASCII, ull); -#endif /* ACE_LACKS_LONGLONG_T */ } else { diff --git a/TAO/orbsvcs/tests/Time/Client_i.cpp b/TAO/orbsvcs/tests/Time/Client_i.cpp index 91b296ff008..2be670a4c2c 100644 --- a/TAO/orbsvcs/tests/Time/Client_i.cpp +++ b/TAO/orbsvcs/tests/Time/Client_i.cpp @@ -60,8 +60,6 @@ Client_i::test_for_universal_time (void) CosTime::UTO_var UTO_server = this->clerk_->universal_time (); - -#ifndef ACE_LACKS_LONGLONG_T ACE_DEBUG ((LM_DEBUG, "\nTime = %Q\nInaccuracy = %Q\nTimeDiff = %d\nstruct.time = %Q" "\nstruct.inacclo = %d\nstruct.inacchi = %d\nstruct.Tdf = %d\n", @@ -72,19 +70,6 @@ Client_i::test_for_universal_time (void) (UTO_server->utc_time ()).inacclo, (UTO_server->utc_time ()).inacchi, (UTO_server->utc_time ()).tdf)); -#else - ACE_DEBUG ((LM_DEBUG, - "\nTime = %u\nInaccuracy = %u\nTimeDiff = %d\nstruct.time = %u" - "\nstruct.inacclo = %d\nstruct.inacchi = %d\nstruct.Tdf = %d\n", - UTO_server->time ().lo(), - UTO_server->inaccuracy ().lo(), - UTO_server->tdf (), - (UTO_server->utc_time ()).time.lo(), - (UTO_server->utc_time ()).inacclo, - (UTO_server->utc_time ()).inacchi, - (UTO_server->utc_time ()).tdf)); -#endif - } catch (const CORBA::Exception& ex) { diff --git a/TAO/performance-tests/POA/Demux/demux_test_client.cpp b/TAO/performance-tests/POA/Demux/demux_test_client.cpp index cc6cb32c954..a08f467c5fe 100644 --- a/TAO/performance-tests/POA/Demux/demux_test_client.cpp +++ b/TAO/performance-tests/POA/Demux/demux_test_client.cpp @@ -324,11 +324,7 @@ Demux_Test_Client::run_linear_test (void) m++; ACE_OS::fprintf (this->result_fp_, "%d %f\n", m, -#if defined(ACE_HRTIME_T_IS_BASIC_TYPE) - 1.0 * (end - start)); -#else 1.0 * ACE_UINT64_DBLCAST_ADAPTER (end - start)); -#endif } return 0; diff --git a/TAO/performance-tests/RTCorba/Thread_Pool/client.cpp b/TAO/performance-tests/RTCorba/Thread_Pool/client.cpp index 83ed440a5e6..ba3e578c082 100644 --- a/TAO/performance-tests/RTCorba/Thread_Pool/client.cpp +++ b/TAO/performance-tests/RTCorba/Thread_Pool/client.cpp @@ -212,11 +212,7 @@ to_seconds (ACE_UINT64 hrtime, ACE_High_Res_Timer::global_scale_factor_type sf) { double seconds = -#if defined ACE_LACKS_LONGLONG_T - hrtime / sf; -#else /* ! ACE_LACKS_LONGLONG_T */ - static_cast<double> (ACE_UINT64_DBLCAST_ADAPTER (hrtime / sf)); -#endif /* ! ACE_LACKS_LONGLONG_T */ + static_cast<double> (ACE_UINT64_DBLCAST_ADAPTER (hrtime / sf)); seconds /= ACE_HR_SCALE_CONVERSION; return seconds; diff --git a/TAO/performance-tests/Throughput/Receiver.cpp b/TAO/performance-tests/Throughput/Receiver.cpp index 26d04303a2d..b44420fd22c 100644 --- a/TAO/performance-tests/Throughput/Receiver.cpp +++ b/TAO/performance-tests/Throughput/Receiver.cpp @@ -58,11 +58,7 @@ Receiver::done (void) this->last_message_time_ - this->start_time_; // convert to microseconds -#if !defined ACE_LACKS_LONGLONG_T ACE_UINT32 usecs = ACE_UINT32(elapsed_time / gsf); -#else /* ! ACE_LACKS_LONGLONG_T */ - ACE_UINT32 usecs = elapsed_time / gsf; -#endif /* ! ACE_LACKS_LONGLONG_T */ if (usecs != 0) { diff --git a/TAO/performance-tests/Throughput/client.cpp b/TAO/performance-tests/Throughput/client.cpp index fd5c633568e..02c342abf9d 100644 --- a/TAO/performance-tests/Throughput/client.cpp +++ b/TAO/performance-tests/Throughput/client.cpp @@ -108,11 +108,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) ACE_hrtime_t elapsed_time = ACE_OS::gethrtime () - start; // convert to microseconds -#if !defined ACE_LACKS_LONGLONG_T ACE_UINT32 usecs = ACE_UINT32(elapsed_time / gsf); -#else /* ! ACE_LACKS_LONGLONG_T */ - ACE_UINT32 usecs = elapsed_time / gsf; -#endif /* ! ACE_LACKS_LONGLONG_T */ double bytes = (1000000.0 * message_count * message_size) / usecs; diff --git a/TAO/tao/AnyTypeCode/Any_Basic_Impl.cpp b/TAO/tao/AnyTypeCode/Any_Basic_Impl.cpp index e90b3cd1162..33756904fe5 100644 --- a/TAO/tao/AnyTypeCode/Any_Basic_Impl.cpp +++ b/TAO/tao/AnyTypeCode/Any_Basic_Impl.cpp @@ -54,15 +54,9 @@ namespace TAO case CORBA::tk_longlong: this->u_.ll = *static_cast<CORBA::LongLong *> (value); break; -#if !defined (ACE_LACKS_LONGLONG_T) case CORBA::tk_ulonglong: - #if !defined (ACE_LACKS_UNSIGNEDLONGLONG_T) this->u_.ull = *static_cast<CORBA::ULongLong *> (value); - #else - this->u_.ull = *static_cast<CORBA::LongLong *> (value); - #endif break; -#endif case CORBA::tk_longdouble: this->u_.ld = *static_cast<CORBA::LongDouble *> (value); break; @@ -194,10 +188,8 @@ namespace TAO return cdr << CORBA::Any::from_octet (this->u_.o); case CORBA::tk_longlong: return cdr << this->u_.ll; -#if !defined (ACE_LACKS_LONGLONG_T) case CORBA::tk_ulonglong: return cdr << this->u_.ull; -#endif case CORBA::tk_longdouble: return cdr << this->u_.ld; case CORBA::tk_wchar: @@ -241,10 +233,8 @@ namespace TAO return cdr >> CORBA::Any::to_octet (this->u_.o); case CORBA::tk_longlong: return cdr >> this->u_.ll; -#if !defined (ACE_LACKS_LONGLONG_T) case CORBA::tk_ulonglong: return cdr >> this->u_.ull; -#endif case CORBA::tk_longdouble: return cdr >> this->u_.ld; case CORBA::tk_wchar: @@ -351,15 +341,9 @@ namespace TAO case CORBA::tk_longlong: *static_cast<CORBA::LongLong *> (dest) = src->u_.ll; break; -#if !defined (ACE_LACKS_LONGLONG_T) case CORBA::tk_ulonglong: - #if !defined (ACE_LACKS_UNSIGNEDLONGLONG_T) *static_cast<CORBA::ULongLong *> (dest) = src->u_.ull; break; - #else - *static_cast<CORBA::LongLong *> (dest) = src->u_.ull; - #endif -#endif case CORBA::tk_longdouble: *static_cast<CORBA::LongDouble *> (dest) = src->u_.ld; break; diff --git a/TAO/tao/AnyTypeCode/Any_Basic_Impl.h b/TAO/tao/AnyTypeCode/Any_Basic_Impl.h index 848056f6ab4..25de22e7fee 100644 --- a/TAO/tao/AnyTypeCode/Any_Basic_Impl.h +++ b/TAO/tao/AnyTypeCode/Any_Basic_Impl.h @@ -81,13 +81,7 @@ namespace TAO CORBA::Char c; CORBA::Octet o; CORBA::LongLong ll; -#if !defined (ACE_LACKS_LONGLONG_T) && !defined (ACE_LACKS_UNSIGNEDLONGLONG_T) CORBA::ULongLong ull; -#elif defined (ACE_LACKS_UNSIGNEDLONGLONG_T) - // Platform has signed long long but not unsigned long long. - // Use signed long long as the container. - CORBA::LongLong ull; -#endif CORBA::LongDouble ld; CORBA::WChar wc; }u_; diff --git a/TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp b/TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp index af5b611128c..661e8414d57 100644 --- a/TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp +++ b/TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp @@ -683,7 +683,6 @@ TAO::TypeCodeFactory::tc_union_factory (CORBA::TCKind /* kind */, false); } break; -#if !defined (ACE_LACKS_LONGLONG_T) case CORBA::tk_ulonglong: { CORBA::ULongLong label; @@ -699,7 +698,6 @@ TAO::TypeCodeFactory::tc_union_factory (CORBA::TCKind /* kind */, false); } break; -#endif /* !ACE_LACKS_LONGLONG_T */ default: return false; } diff --git a/TAO/tao/Default_Endpoint_Selector_Factory.h b/TAO/tao/Default_Endpoint_Selector_Factory.h index f6067d196f0..59fce9ff79c 100644 --- a/TAO/tao/Default_Endpoint_Selector_Factory.h +++ b/TAO/tao/Default_Endpoint_Selector_Factory.h @@ -39,7 +39,7 @@ class TAO_Default_Endpoint_Selector; * @brief Factory for initializing <Endpoint_Selection_State> and * obtaining appropriate <Invocation_Endpoint_Selector>. * - * Used by Invocation classes to intialize its endpoint selection + * Used by Invocation classes to initialize its endpoint selection * strategy and state based on the effective policies. * Endpoint selection strategies are stateless objects - all the * state they need is contained by Invocation in @@ -61,8 +61,7 @@ public: /// Get an Invocation's endpoint selection strategy and /// initialize the endpoint selection state instance. - virtual TAO_Invocation_Endpoint_Selector *get_selector ( - void); + virtual TAO_Invocation_Endpoint_Selector *get_selector (void); private: diff --git a/TAO/tao/DynamicAny/DynAny_i.cpp b/TAO/tao/DynamicAny/DynAny_i.cpp index 66045521d96..0d776c34fbf 100644 --- a/TAO/tao/DynamicAny/DynAny_i.cpp +++ b/TAO/tao/DynamicAny/DynAny_i.cpp @@ -102,14 +102,12 @@ TAO_DynAny_i::set_to_default_value (CORBA::TypeCode_ptr tc) case CORBA::tk_ulong: this->any_ <<= static_cast<CORBA::ULong> (0); break; -#if !defined (ACE_LACKS_LONGLONG_T) case CORBA::tk_longlong: this->any_ <<= static_cast<CORBA::LongLong> (0); break; case CORBA::tk_ulonglong: this->any_ <<= static_cast<CORBA::ULongLong> (0); break; -#endif /* ACE_LACKS_LONGLONG_T */ case CORBA::tk_boolean: this->any_ <<= CORBA::Any::from_boolean (0); break; diff --git a/TAO/tao/DynamicAny/DynUnion_i.cpp b/TAO/tao/DynamicAny/DynUnion_i.cpp index 2916277ea96..9f5ced312f4 100644 --- a/TAO/tao/DynamicAny/DynUnion_i.cpp +++ b/TAO/tao/DynamicAny/DynUnion_i.cpp @@ -924,7 +924,6 @@ TAO_DynUnion_i::label_match (const CORBA::Any &my_any, return my_val == other_val; } // For platforms without native 64-bit ints. -#if !defined (ACE_LACKS_LONGLONG_T) case CORBA::tk_longlong: { CORBA::LongLong my_val; @@ -933,7 +932,6 @@ TAO_DynUnion_i::label_match (const CORBA::Any &my_any, other_any >>= other_val; return my_val == other_val; } -#endif /* ACE_LACKS_LONGLONG_T */ case CORBA::tk_ulonglong: { CORBA::ULongLong my_val; diff --git a/TAO/tao/MProfile.inl b/TAO/tao/MProfile.inl index 2a999b71b60..3854c3c11c8 100644 --- a/TAO/tao/MProfile.inl +++ b/TAO/tao/MProfile.inl @@ -1,8 +1,6 @@ // -*- C++ -*- -// // $Id$ - TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE @@ -41,8 +39,7 @@ TAO_MProfile::operator= (const TAO_MProfile& rhs) return *this; } -// Cyclic get next. It will simply cycle through the complete list. - +/// Cyclic get next. It will simply cycle through the complete list. ACE_INLINE TAO_Profile * TAO_MProfile::get_cnext (void) { @@ -55,9 +52,8 @@ TAO_MProfile::get_cnext (void) return pfiles_[current_++]; } -// This will return the next element until either null is found or the -// end of list. It then continues to return NULL until rewind. - +/// This will return the next element until either null is found or the +/// end of list. It then continues to return NULL until rewind. ACE_INLINE TAO_Profile * TAO_MProfile::get_next (void) { @@ -96,7 +92,6 @@ TAO_MProfile::get_prev (void) } // does not affect the current_ setting! - ACE_INLINE TAO_Profile * TAO_MProfile::get_profile (TAO_PHandle handle) { diff --git a/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp b/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp index ac81a7a31ce..3255cc1f114 100644 --- a/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp +++ b/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp @@ -528,7 +528,6 @@ TAO_TypeCodeFactory_i::create_union_tc ( CORBA::NO_MEMORY ()); } break; -#if !defined (ACE_LACKS_LONGLONG_T) case CORBA::tk_ulonglong: { CORBA::ULongLong label; @@ -550,7 +549,6 @@ TAO_TypeCodeFactory_i::create_union_tc ( CORBA::NO_MEMORY ()); } break; -#endif /* !ACE_LACKS_LONGLONG_T */ default: throw ::CORBA::BAD_PARAM ( CORBA::OMGVMCID | 20, @@ -873,9 +871,7 @@ TAO_TypeCodeFactory_i::compute_default_label ( CORBA::UShort ushort_val; CORBA::Long long_val; CORBA::ULong ulong_val; -#if !defined (ACE_LACKS_LONGLONG_T) CORBA::ULongLong ulonglong_val; -#endif /* ACE_LACKS_LONGLONG_T */ CORBA::ULong enum_val; // TODO - handle (u)longlong types } dv, u; @@ -886,9 +882,7 @@ TAO_TypeCodeFactory_i::compute_default_label ( dv.ushort_val = 0; dv.long_val = ACE_INT32_MIN; dv.ulong_val = 0; -#if !defined (ACE_LACKS_LONGLONG_T) dv.ulonglong_val = 0; -#endif /* ACE_LACKS_LONGLONG_T */ dv.enum_val = 0; CORBA::ULong const len = members.length (); @@ -965,7 +959,6 @@ TAO_TypeCodeFactory_i::compute_default_label ( success = false; } break; -#if !defined (ACE_LACKS_LONGLONG_T) case CORBA::tk_ulonglong: members[i].label >>= u.ulonglong_val; @@ -975,7 +968,6 @@ TAO_TypeCodeFactory_i::compute_default_label ( success = false; } break; -#endif /* ACE_LACKS_LONGLONG_T */ case CORBA::tk_enum: { TAO::Any_Impl *impl = members[i].label.impl (); @@ -1086,7 +1078,6 @@ TAO_TypeCodeFactory_i::compute_default_label ( case_type (dv.ulong_val)); } break; -#if !defined (ACE_LACKS_LONGLONG_T) case CORBA::tk_ulonglong: { typedef TAO::TypeCode::Case_T<CORBA::ULongLong, @@ -1097,7 +1088,6 @@ TAO_TypeCodeFactory_i::compute_default_label ( case_type (dv.ulonglong_val)); } break; -#endif /* ACE_LACKS_LONGLONG_T */ case CORBA::tk_enum: { // Enumerators are encoded as CORBA::ULong. diff --git a/TAO/tao/orb.idl b/TAO/tao/orb.idl index f462c330841..0d359bec400 100644 --- a/TAO/tao/orb.idl +++ b/TAO/tao/orb.idl @@ -21,14 +21,8 @@ #include <tao/UShortSeq.pidl> #include <tao/WCharSeq.pidl> #include <tao/WStringSeq.pidl> - -#if ! defined (ACE_LACKS_LONGLONG_T) #include <tao/LongLongSeq.pidl> -#endif /* ! defined (ACE_LACKS_LONGLONG_T) */ - -#if ! defined (ACE_LACKS_U_LONGLONG_T) #include <tao/ULongLongSeq.pidl> -#endif /* ! defined (ACE_LACKS_U_LONGLONG_T) */ #include <tao/Policy.pidl> #include <tao/Policy_Manager.pidl> diff --git a/TAO/tests/Param_Test/anyop.cpp b/TAO/tests/Param_Test/anyop.cpp index 9a23a40ed16..9ac6b304a67 100644 --- a/TAO/tests/Param_Test/anyop.cpp +++ b/TAO/tests/Param_Test/anyop.cpp @@ -156,18 +156,9 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) if (!(any >>= o) || i != o) { -#if defined (ACE_LACKS_LONGLONG_T) - char bufferi[32]; - char buffero[32]; - ACE_DEBUG ((LM_DEBUG, - "Failure for CORBA::ULongLong (%C,%C)\n", - i.as_string (bufferi), - o.as_string (buffero))); -#else ACE_DEBUG ((LM_DEBUG, "Failure for CORBA::ULongLong (%Q,%Q)\n", i, o)); -#endif } } diff --git a/TAO/tests/Param_Test/ulonglong.cpp b/TAO/tests/Param_Test/ulonglong.cpp index 0156640958f..1aadf506f03 100644 --- a/TAO/tests/Param_Test/ulonglong.cpp +++ b/TAO/tests/Param_Test/ulonglong.cpp @@ -114,23 +114,6 @@ Test_ULongLong::check_validity (CORBA::Request_ptr ) void Test_ULongLong::print_values (void) { -#if defined(ACE_LACKS_LONGLONG_T) - char bufferin[32]; - char bufferinout[32]; - char bufferout[32]; - char bufferret[32]; - ACE_DEBUG ((LM_DEBUG, - "\n=*=*=*=*=*=*\n" - "in = %s, " - "inout = %s, " - "out = %s, " - "ret = %s\n" - "\n=*=*=*=*=*=*\n", - this->in_.as_string (bufferin), - this->inout_.as_string (bufferinout), - this->out_.as_string (bufferout), - this->ret_.as_string (bufferret))); -#else ACE_DEBUG ((LM_DEBUG, "\n=*=*=*=*=*=*\n" "in = %Q, " @@ -142,5 +125,4 @@ Test_ULongLong::print_values (void) this->inout_, this->out_, this->ret_)); -#endif } diff --git a/TAO/tests/Policies/Manipulation.cpp b/TAO/tests/Policies/Manipulation.cpp index 28603617dc6..b49ac5b2594 100644 --- a/TAO/tests/Policies/Manipulation.cpp +++ b/TAO/tests/Policies/Manipulation.cpp @@ -277,13 +277,8 @@ Manipulation::svc (void) { try { -#ifndef ACE_LACKS_LONGLONG_T unsigned int seed = static_cast<unsigned int> (ACE_OS::gethrtime ()); -#else - unsigned int seed = - static_cast<unsigned int> (ACE_OS::gethrtime().lo()); -#endif CORBA::Object_var object = this->orb_->resolve_initial_references ("ORBPolicyManager"); diff --git a/TAO/tests/Queued_Message_Test/Queued_Message_Test.cpp b/TAO/tests/Queued_Message_Test/Queued_Message_Test.cpp index e9cfc0daf8b..e89e71d1637 100644 --- a/TAO/tests/Queued_Message_Test/Queued_Message_Test.cpp +++ b/TAO/tests/Queued_Message_Test/Queued_Message_Test.cpp @@ -91,12 +91,8 @@ ACE_TMAIN(int, ACE_TCHAR *[]) // using command line options. ACE_hrtime_t current_hrtime = ACE_OS::gethrtime (); -#if defined(ACE_HRTIME_T_IS_BASIC_TYPE) - ACE_UINT32 seed = current_hrtime; -#else ACE_UINT32 seed = ACE_CU64_TO_CU32(current_hrtime); -#endif ACE_OS::srand (seed); ACE_DEBUG ((LM_DEBUG, "Running test SEED = %d\n", seed)); |