-
Notifications
You must be signed in to change notification settings - Fork 177
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
Use Windows Unicode API in C stubs #843
Conversation
I don't have a windows machine to try this on. Anyone has one? Alternatively, I can merge the Github Actions PR first so we have windows in the CI. |
This part isn't strictly necessary - defining |
Yes, I was suggesting it for the sake of explicitness, considering that I'm removing the comment below, in which we could also have explicitly called
|
dd0d4a6
to
db3d1e2
Compare
I noticed that this patch requires OCaml >= 4.06, so changed that on Windows. |
fa5551f
to
099acb5
Compare
0c1dd3c
to
7989c85
Compare
Sorry for all the force-pushes, it's a bit late in the day. Can confirm that this PR works now, it was nicely broken before. |
7989c85
to
9fced69
Compare
I'm just starting to think we should test on all, even on Windows. |
At least the oldest and the newest. I'm interested by the newest, where all the cool bug fixes go! |
Certainly, testing the oldest and newest ones sounds like a good idea. |
I just merged #896 |
So this PR now needs to update the test matrix to test 4.06 on Windows instead of 4.02 |
8583dff
to
1a55ce2
Compare
Just needs a CHANGES entry. |
1a55ce2
to
4f2d045
Compare
Rebased and added an entry. |
Great thank you |
> If this flag is set, the environment block pointed to by > lpEnvironment uses Unicode characters. Otherwise, the environment > block uses ANSI characters. [doc][] This was forgotten from PR ocsigen#843 that switched to Unicode strings on Windows (including the environment). [doc]: https://docs.microsoft.com/en-us/windows/win32/procthread/process-creation-flags#CREATE_UNICODE_ENVIRONMENT
> If the environment block pointed to by lpEnvironment contains > Unicode characters, be sure that dwCreationFlags includes > CREATE_UNICODE_ENVIRONMENT. If this parameter is NULL and the > environment block of the parent process contains Unicode characters, > you must also ensure that dwCreationFlags includes > CREATE_UNICODE_ENVIRONMENT. From [doc1][]. > If this flag is set, the environment block pointed to by > lpEnvironment uses Unicode characters. Otherwise, the environment > block uses ANSI characters. From [doc2][]. This was forgotten from PR ocsigen#843 that switched to Unicode strings on Windows (including the environment). [doc1]: https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw [doc2]: https://docs.microsoft.com/en-us/windows/win32/procthread/process-creation-flags#CREATE_UNICODE_ENVIRONMENT
> If the environment block pointed to by lpEnvironment contains > Unicode characters, be sure that dwCreationFlags includes > CREATE_UNICODE_ENVIRONMENT. If this parameter is NULL and the > environment block of the parent process contains Unicode characters, > you must also ensure that dwCreationFlags includes > CREATE_UNICODE_ENVIRONMENT. From [doc1][]. > If this flag is set, the environment block pointed to by > lpEnvironment uses Unicode characters. Otherwise, the environment > block uses ANSI characters. From [doc2][]. This was forgotten from PR ocsigen#843 that switched to Unicode strings on Windows (including the environment). [doc1]: https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw [doc2]: https://docs.microsoft.com/en-us/windows/win32/procthread/process-creation-flags#CREATE_UNICODE_ENVIRONMENT
> If the environment block pointed to by lpEnvironment contains > Unicode characters, be sure that dwCreationFlags includes > CREATE_UNICODE_ENVIRONMENT. If this parameter is NULL and the > environment block of the parent process contains Unicode characters, > you must also ensure that dwCreationFlags includes > CREATE_UNICODE_ENVIRONMENT. From [doc1][]. > If this flag is set, the environment block pointed to by > lpEnvironment uses Unicode characters. Otherwise, the environment > block uses ANSI characters. From [doc2][]. This was forgotten from PR ocsigen#843 that switched to Unicode strings on Windows (including the environment). [doc1]: https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw [doc2]: https://docs.microsoft.com/en-us/windows/win32/procthread/process-creation-flags#CREATE_UNICODE_ENVIRONMENT
This was discussed a bit in #790.
I looked for windows functions in
src/unix/{,windows_c}/*.c
.Two possible changes to this patch:
CreateProcess
.