summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-02-23 15:00:54 (GMT)
committerBrad King <brad.king@kitware.com>2002-02-23 15:00:54 (GMT)
commita6333bfca3c3059776a6a89023da7266fd228344 (patch)
tree5d7c2e69e7553d2ddc9eee8135d0acf18044f1fe /Source
parentb8d2413156333bc5917319dc6de1ca07a8fb3897 (diff)
downloadCMake-a6333bfca3c3059776a6a89023da7266fd228344.zip
CMake-a6333bfca3c3059776a6a89023da7266fd228344.tar.gz
CMake-a6333bfca3c3059776a6a89023da7266fd228344.tar.bz2
ERR: std::ios::binary is only needed for Windows platforms, and isn't supported for all UNIX platforms.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmSystemTools.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 3e4efc6..74e1621 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -870,7 +870,11 @@ void cmSystemTools::cmCopyFile(const char* source,
{
const int bufferSize = 4096;
char buffer[bufferSize];
- std::ifstream fin(source, std::ios::binary | std::ios::in);
+ std::ifstream fin(source,
+#ifdef _WIN32
+ std::ios::binary |
+#endif
+ std::ios::in);
if(!fin)
{
cmSystemTools::Error("CopyFile failed to open input file \"",
@@ -878,7 +882,10 @@ void cmSystemTools::cmCopyFile(const char* source,
return;
}
std::ofstream fout(destination,
- std::ios::binary | std::ios::out | std::ios::trunc);
+#ifdef _WIN32
+ std::ios::binary |
+#endif
+ std::ios::out | std::ios::trunc);
if(!fout)
{
cmSystemTools::Error("CopyFile failed to open output file \"",