summaryrefslogtreecommitdiffstats
path: root/kwsysPlatformTestsCXX.cxx
diff options
context:
space:
mode:
authorKWSys Robot <kwrobot@kitware.com>2012-10-16 21:12:23 (GMT)
committerBrad King <brad.king@kitware.com>2012-10-31 20:43:34 (GMT)
commit7ae44db4b9a1b3b26f2d670135fc00324e24f348 (patch)
treec4ce9f6df920f1b4e947376d01cb4f0e03fe7829 /kwsysPlatformTestsCXX.cxx
parent5d0de36d2b2f420ab58841bbcd47c45fcdc4486e (diff)
downloadCMake-7ae44db4b9a1b3b26f2d670135fc00324e24f348.zip
CMake-7ae44db4b9a1b3b26f2d670135fc00324e24f348.tar.gz
CMake-7ae44db4b9a1b3b26f2d670135fc00324e24f348.tar.bz2
KWSys 2012-10-16 (b7a97ac3)
Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ b7a97ac3 | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' bab53989..b7a97ac3 Brad King (3): f9db7eab SystemInformation: Fix helper definition order a1e83e42 SystemInformation: Expose helper functions only where needed b7a97ac3 SystemInformation: Drop unused LoadLines on OS X Burlen Loring (1): 6072e63b SystemInformation: support for resource limits Sean McBride (2): a536d833 ProcessUNIX: Suppress warning about uninteresting return code 00852081 SystemInformation: Fix sloppy use of sysctlbyname() API Change-Id: Iae8af129a021435ef4e6daef255e312c99d7b773
Diffstat (limited to 'kwsysPlatformTestsCXX.cxx')
-rw-r--r--kwsysPlatformTestsCXX.cxx66
1 files changed, 66 insertions, 0 deletions
diff --git a/kwsysPlatformTestsCXX.cxx b/kwsysPlatformTestsCXX.cxx
index 7b73d06..ae58703 100644
--- a/kwsysPlatformTestsCXX.cxx
+++ b/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. */