summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 \"",