summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/kwsysPlatformTestsCXX.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-08-31 17:00:55 (GMT)
committerBrad King <brad.king@kitware.com>2009-08-31 17:00:55 (GMT)
commit207aab6acf214e05572c772e19a53ad4bff151f0 (patch)
treeba878ff5f922f71223f849cf69fb9a8aee620370 /Source/kwsys/kwsysPlatformTestsCXX.cxx
parent6d0b6f2b9e959be073a91d6040810b3057f2b1b1 (diff)
downloadCMake-207aab6acf214e05572c772e19a53ad4bff151f0.zip
CMake-207aab6acf214e05572c772e19a53ad4bff151f0.tar.gz
CMake-207aab6acf214e05572c772e19a53ad4bff151f0.tar.bz2
Define kwsys_ios_binary macro for std::ios::binary
The 'binary' openmode does not exist on all compilers. We define macro <kwsys>_ios_binary, where <kwsys> is the KWSys namespace, to refer to std::ios::binary if it exists and 0 otherwise. Sample usage: kwsys_ios::ifstream fin(fn, kwsys_ios::ios::in | kwsys_ios_binary);
Diffstat (limited to 'Source/kwsys/kwsysPlatformTestsCXX.cxx')
-rw-r--r--Source/kwsys/kwsysPlatformTestsCXX.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/kwsys/kwsysPlatformTestsCXX.cxx b/Source/kwsys/kwsysPlatformTestsCXX.cxx
index 3d5550d..502e2d8 100644
--- a/Source/kwsys/kwsysPlatformTestsCXX.cxx
+++ b/Source/kwsys/kwsysPlatformTestsCXX.cxx
@@ -294,6 +294,17 @@ int main()
}
#endif
+#ifdef TEST_KWSYS_IOS_HAVE_BINARY
+int test_binary(int, ...)
+{
+ return 0;
+}
+int main()
+{
+ return test_binary(1, kwsys_ios::ios::binary);
+}
+#endif
+
#ifdef TEST_KWSYS_IOS_HAS_ISTREAM_LONG_LONG
int test_istream(kwsys_ios::istream& is, long long& x)
{