This is an automated email from the ASF dual-hosted git repository.

dkulp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/master by this push:
     new 3299a9f  fixes unicode compile on windows
3299a9f is described below

commit 3299a9f0fa36367c7b5a68dc6bde633fe6e1ae1c
Author: skarlsson <[email protected]>
AuthorDate: Sun Feb 12 15:07:13 2017 +0100

    fixes unicode compile on windows
---
 lang/c++/impl/FileStream.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lang/c++/impl/FileStream.cc b/lang/c++/impl/FileStream.cc
index 6369968..ba78f1a 100644
--- a/lang/c++/impl/FileStream.cc
+++ b/lang/c++/impl/FileStream.cc
@@ -51,7 +51,7 @@ struct FileBufferCopyIn : public BufferCopyIn {
 #ifdef _WIN32
     HANDLE h_;
     FileBufferCopyIn(const char* filename) :
-        h_(::CreateFile(filename, GENERIC_READ, 0, NULL, OPEN_ALWAYS, 
FILE_ATTRIBUTE_NORMAL, NULL)) {
+        h_(::CreateFileA(filename, GENERIC_READ, 0, NULL, OPEN_ALWAYS, 
FILE_ATTRIBUTE_NORMAL, NULL)) {
         if (h_ == INVALID_HANDLE_VALUE) {
             throw Exception(boost::format("Cannot open file: %1%") % 
::GetLastError());
         }
@@ -220,7 +220,7 @@ struct FileBufferCopyOut : public BufferCopyOut {
 #ifdef _WIN32
     HANDLE h_;
     FileBufferCopyOut(const char* filename) :
-        h_(::CreateFile(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 
FILE_ATTRIBUTE_NORMAL, NULL)) {
+        h_(::CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 
FILE_ATTRIBUTE_NORMAL, NULL)) {
         if (h_ == INVALID_HANDLE_VALUE) {
             throw Exception(boost::format("Cannot open file: %1%") % 
::GetLastError());
         }

Reply via email to