summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/kwsysPlatformTestsCXX.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-11-20 13:37:33 (GMT)
committerBrad King <brad.king@kitware.com>2009-11-20 13:37:33 (GMT)
commit2d80c9e31a3aab40589795d769602821afcb4030 (patch)
tree2e26d36bb993e574498583ed3a3a7adabf311b90 /Source/kwsys/kwsysPlatformTestsCXX.cxx
parent2a789187fc2154c3c3850933f30d45580d9b8076 (diff)
downloadCMake-2d80c9e31a3aab40589795d769602821afcb4030.zip
CMake-2d80c9e31a3aab40589795d769602821afcb4030.tar.gz
CMake-2d80c9e31a3aab40589795d769602821afcb4030.tar.bz2
Check for 'long long' without computing size
In KWSys IOStream we need to detect whether 'long long' exists but we do not need its size. We avoid using CHECK_TYPE_SIZE because it does not work for types whose size varies across architectuers in Mac OS X universal binaries. See issue #9913.
Diffstat (limited to 'Source/kwsys/kwsysPlatformTestsCXX.cxx')
-rw-r--r--Source/kwsys/kwsysPlatformTestsCXX.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/kwsys/kwsysPlatformTestsCXX.cxx b/Source/kwsys/kwsysPlatformTestsCXX.cxx
index 4a19ef8..903be9b 100644
--- a/Source/kwsys/kwsysPlatformTestsCXX.cxx
+++ b/Source/kwsys/kwsysPlatformTestsCXX.cxx
@@ -113,6 +113,15 @@ void f(size_t) {}
int main() { return 0; }
#endif
+#ifdef TEST_KWSYS_CXX_HAS_LONG_LONG
+long long f(long long n) { return n; }
+int main()
+{
+ long long n = 0;
+ return static_cast<int>(f(n));
+}
+#endif
+
#ifdef TEST_KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS
template <class T> class A;
template <class T> int f(A<T>&);