Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on MinGW32 #3485

Merged
merged 8 commits into from
Aug 11, 2017
Merged

Fix build on MinGW32 #3485

merged 8 commits into from
Aug 11, 2017

Conversation

liujisi
Copy link
Contributor

@liujisi liujisi commented Aug 11, 2017

Restrict the io_win32 change and only enable that for MSVC, because:

  1. lots of the _w functions are not available on MinGW32 (possibly on cygwin either)
  2. those platforms include <io.h> already via other common headers; using the functions in internal::win32 creates conflicts.

This is a temporary fix to make the build pass. We can revisit this if support on MinGW32 is required. Note that the pre-built protoc artifacts are built under mingw32. With this change, they won't use the long path support code and would rely on the platform APIs for path support.

This excludes cygwin and mingw from using the self implemented
functions.
strdup is not part C or C++ standard but POXIS function. Several
compilers failed to compile strdup or generate warnings.
@liujisi liujisi requested a review from xfxyjwf August 11, 2017 21:07
@liujisi
Copy link
Contributor Author

liujisi commented Aug 11, 2017

This fixes #3483
@laszlocsomor

@liujisi liujisi merged commit eaeca0d into protocolbuffers:3.4.x Aug 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants