From ab6f8c3677f7b6c77a9eb28abacd0ce379158408 Mon Sep 17 00:00:00 2001 From: Clinton Stimpson <clinton@elemtech.com> Date: Sat, 14 Dec 2013 16:40:48 -0700 Subject: [PATCH] FStream: Fix rdbuf() return and use use of FStream in SystemTools. SystemTools still had uses of kwsys_ios::ofstream that need changed to kwsys::ofstream to support utf-8 encoding of filenames. Change-Id: I308e9cc055295881405b1b079d0653dab37b8d3d --- FStream.hxx.in | 2 +- SystemTools.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/FStream.hxx.in b/FStream.hxx.in index 8170fb37..c340c55a 100644 --- a/FStream.hxx.in +++ b/FStream.hxx.in @@ -81,7 +81,7 @@ namespace @KWSYS_NAMESPACE@ internal_buffer_type *rdbuf() const { - return buf_.get(); + return buf_; } ~basic_ifstream() diff --git a/SystemTools.cxx b/SystemTools.cxx index 4649f3b2..f4a443f9 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -2115,10 +2115,10 @@ bool SystemTools::CopyFileAlways(const char* source, const char* destination) SystemTools::RemoveFile(destination); #if defined(_WIN32) || defined(__CYGWIN__) - kwsys_ios::ofstream fout(destination, + kwsys::ofstream fout(destination, kwsys_ios::ios::binary | kwsys_ios::ios::out | kwsys_ios::ios::trunc); #else - kwsys_ios::ofstream fout(destination, + kwsys::ofstream fout(destination, kwsys_ios::ios::out | kwsys_ios::ios::trunc); #endif if(!fout) -- GitLab