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

Is _MBCS required? #59

Closed
degski opened this issue Jun 28, 2019 · 4 comments
Closed

Is _MBCS required? #59

degski opened this issue Jun 28, 2019 · 4 comments

Comments

@degski
Copy link

degski commented Jun 28, 2019

The default solution file on Windows/VS20XX compiles the code as Multi Byte Character Set. This appears to have been done quite deliberately.

Is this really necessary or can the code also be compiled as UNICODE, which would be preferable.

@daanx
Copy link
Collaborator

daanx commented Jun 28, 2019

Ah I see. I think I used _MBCS as I prefer to treat strings at UTF8 .(.. but that does not hold on Windows anyway as _MBCS does not use UTF8). So, mostly accidental -- nothing in mimalloc depends on this (as far as I know, perhaps the mi_realpath function needs an adjustment?)

@degski
Copy link
Author

degski commented Jun 29, 2019

@daanx Thanks. So, it would be best to change the setup of the included vs-solution back to the default, UNICODE. Unless you call any Win32-API xxxxxA functions directly (as opposed to the xxxxxW) functions, nothing needs adjusting since they [the win-api functions] are all wrapped in macros (and selected based on _MBCS or _UNICODE being defined).

@daanx
Copy link
Collaborator

daanx commented Jul 4, 2019

Fixed in #24feb5e

@daanx daanx closed this as completed Jul 4, 2019
@degski
Copy link
Author

degski commented Jul 4, 2019

Thanks, I've reverted to a simple build script, building a number of variants and then use auto-linking to pick the right one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants