diff options
author | Brad King <brad.king@kitware.com> | 2012-10-31 20:44:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-10-31 20:44:00 (GMT) |
commit | 17fb60bb13643a0f79c815688c317f56c551ae58 (patch) | |
tree | 33710b20819640040b4cd91186dca3ac853a520d /Source/kwsys/kwsysPlatformTestsCXX.cxx | |
parent | 97c98876b715dd954b4ce744a1a86d1d14e6ab9d (diff) | |
parent | 7ae44db4b9a1b3b26f2d670135fc00324e24f348 (diff) | |
download | CMake-17fb60bb13643a0f79c815688c317f56c551ae58.zip CMake-17fb60bb13643a0f79c815688c317f56c551ae58.tar.gz CMake-17fb60bb13643a0f79c815688c317f56c551ae58.tar.bz2 |
Merge branch 'upstream-kwsys' into import-KWSys-subtree
Diffstat (limited to 'Source/kwsys/kwsysPlatformTestsCXX.cxx')
-rw-r--r-- | Source/kwsys/kwsysPlatformTestsCXX.cxx | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/Source/kwsys/kwsysPlatformTestsCXX.cxx b/Source/kwsys/kwsysPlatformTestsCXX.cxx index 7b73d06..ae58703 100644 --- a/Source/kwsys/kwsysPlatformTestsCXX.cxx +++ b/Source/kwsys/kwsysPlatformTestsCXX.cxx @@ -358,6 +358,30 @@ int main() } #endif +#ifdef TEST_KWSYS_IOS_HAS_ISTREAM___INT64 +int test_istream(kwsys_ios::istream& is, __int64& x) +{ + return (is >> x)? 1:0; +} +int main() +{ + __int64 x = 0; + return test_istream(kwsys_ios::cin, x); +} +#endif + +#ifdef TEST_KWSYS_IOS_HAS_OSTREAM___INT64 +int test_ostream(kwsys_ios::ostream& os, __int64 x) +{ + return (os << x)? 1:0; +} +int main() +{ + __int64 x = 0; + return test_ostream(kwsys_ios::cout, x); +} +#endif + #ifdef TEST_KWSYS_CHAR_IS_SIGNED /* Return 0 for char signed and 1 for char unsigned. */ int main() @@ -428,6 +452,48 @@ int main() } #endif +#ifdef TEST_KWSYS_CXX_HAS_RLIMIT64 +# if defined(KWSYS_HAS_LFS) +# define _LARGEFILE_SOURCE +# define _LARGEFILE64_SOURCE +# define _LARGE_FILES +# define _FILE_OFFSET_BITS 64 +# endif +# include <sys/resource.h> +int main() +{ + struct rlimit64 rlim; + return getrlimit64(0,&rlim); +} +#endif + +#ifdef TEST_KWSYS_CXX_HAS_ATOLL +#include <stdlib.h> +int main() +{ + const char *str="1024"; + return static_cast<int>(atoll(str)); +} +#endif + +#ifdef TEST_KWSYS_CXX_HAS_ATOL +#include <stdlib.h> +int main() +{ + const char *str="1024"; + return static_cast<int>(atol(str)); +} +#endif + +#ifdef TEST_KWSYS_CXX_HAS__ATOI64 +#include <stdlib.h> +int main() +{ + const char *str="1024"; + return static_cast<int>(_atoi64(str)); +} +#endif + #ifdef TEST_KWSYS_CXX_TYPE_INFO /* Collect fundamental type information and save it to a CMake script. */ |