Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

fix win32 build of eosio-blocklog #7640

Merged
merged 1 commit into from
Jul 12, 2019
Merged

Conversation

spoonincode
Copy link
Contributor

@spoonincode spoonincode commented Jul 11, 2019

on win32 .c_str() of a std/bfs::path returns a wchar array. Use _wfopen() instead of fopen() there so that we can handle these paths without down converting them to ASCII. I don't see any other way to do this if we want to keep the C file api.

Also change the rename() calls to simply use the bfs::path variants for similar reasons.

Also add "b" to open mode -- win32 does indeed have behavior differences there unlike POSIX.

.c_str() of a std/bfs::path returns a wchar array. On win32 use _wfopen() instead of fopen() so that we can handle these paths without down converting them to ASCII. I don't see any other way to do this if we want to keep the C file api.

Also change the rename() calls to simply use the bfs::path variants for similar reasons.

Also add "b" to open mode -- win32 does indeed have behavior differences there unlike POSIX.
@spoonincode spoonincode changed the title eg fix win32 build of eosio-blocklog Jul 11, 2019
@spoonincode spoonincode merged commit 9e1007c into develop Jul 12, 2019
@spoonincode spoonincode deleted the win32_eosio_blocklog_fix branch July 12, 2019 17:24
@spoonincode spoonincode mentioned this pull request Aug 12, 2019
heifner added a commit that referenced this pull request Aug 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants