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

@ngg
Copy link
Contributor

@ngg ngg 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.

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
Copy link

@coveralls coveralls 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.

Loading

@bradh352 bradh352 self-requested a review Sep 15, 2017
Copy link
Member

@bradh352 bradh352 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?

Loading

@bradh352 bradh352 requested a review from daviddrysdale Sep 15, 2017
@ngg
Copy link
Contributor Author

@ngg ngg 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.

Loading

@bradh352 bradh352 merged commit 2a9e231 into c-ares:master Sep 18, 2017
2 checks passed
Loading
DronRathore added a commit to DronRathore/c-ares that referenced this issue Mar 11, 2020
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants