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

Force using the ANSI versions of WinAPI functions #142

Merged
merged 1 commit into from Sep 18, 2017

Conversation

Projects
None yet
3 participants
@ngg
Copy link
Contributor

commented Sep 6, 2017

When compiling c-ares with a build system that defines UNICODE,
bad versions of WinAPI functions are used causing failures or even
crashes. When windows.h is included in MBCS mode (like in the default
build system), the ..A versions are the same as using the one without
any suffix.

Force using the ANSI versions of WinAPI functions
When compiling c-ares with a build system that defines UNICODE,
bad versions of WinAPI functions are used causing failures or even
crashes. When windows.h is included in MBCS mode (like in the default
build system), the ..A versions are the same as using the one without
any suffix.
@coveralls

This comment has been minimized.

Copy link

commented Sep 6, 2017

Coverage Status

Coverage remained the same at 95.382% when pulling 0ecde07 on tresorit:win-unicode into cb68526 on c-ares:master.

@bradh352 bradh352 self-requested a review Sep 15, 2017

@bradh352
Copy link
Member

left a comment

I do not technically see anything wrong with this. However, I am curious under what circumstance this is actually seen since none of the build systems provided by c-ares enable UNICODE therefore this is a non-issue if using the supported build systems. Are you embedding c-ares without using one of the provided build systems?

@bradh352 bradh352 requested a review from daviddrysdale Sep 15, 2017

@ngg

This comment has been minimized.

Copy link
Contributor Author

commented Sep 18, 2017

We use a separate build system as we want to compile cares and curl for 10+ platforms with a single unified build system together with other libraries and our own project.
In the past we faced lots of issues when some libraries are built with UNICODE and some with MBCS mode, so we want to build everything in UNICODE mode. We patched this for ourselves but thought it might cause issues for other users as well, that's why I submitted this PR.

@bradh352 bradh352 merged commit 2a9e231 into c-ares:master Sep 18, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 95.382%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.