summaryrefslogtreecommitdiff
path: root/ACE/ace/Truncate.h
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2012-05-15 18:23:04 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2012-05-15 18:23:04 +0000
commit38d791f18d8a67b8b9319f4b6a9579101628b28c (patch)
treebe35c69512246f58a303abc27e2028a848a78f8a /ACE/ace/Truncate.h
parent7d6ea0dc00c882c452db06f31af9acc17fc18046 (diff)
downloadATCD-38d791f18d8a67b8b9319f4b6a9579101628b28c.tar.gz
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.
Diffstat (limited to 'ACE/ace/Truncate.h')
-rw-r--r--ACE/ace/Truncate.h44
1 files changed, 0 insertions, 44 deletions
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