file: Support unicode urls on windows - #6501
Conversation
That is because open takes 2 or 3 arguments. To fix it you could do |
There was a problem hiding this comment.
Please don't redfine a POSIX syscall
There was a problem hiding this comment.
Why even define the function on non Windows platforms?
There was a problem hiding this comment.
It's not, this is in a #if defined(USE_WIN32_LARGE_FILES) || defined(USE_WIN32_SMALL_FILES) block.
There was a problem hiding this comment.
The error value is defined as -1 and 0 might be a valid result: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/open-wopen?view=msvc-160#return-value
There was a problem hiding this comment.
Thanks, totally missed it (and the later check as mentioned below).
63585f8 to
1106ff3
Compare
There was a problem hiding this comment.
This should be if(result != -1) now.
1106ff3 to
6dc311a
Compare
There was a problem hiding this comment.
I would do away with __VA_ARGS__ I don't think all compilers support it
9a9a4fc to
cf951b5
Compare
cf951b5 to
2f71f51
Compare
|
Thanks |
Support file: urls with utf-8 filenames on Windows when _UNICODE is defined.