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 #3076: Support native Windows toolchain #3866

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ekrich
Copy link
Member

@ekrich ekrich commented Apr 6, 2024

Default using MSVC tools compiles for i686-pc-windows-msvc (32 bit) so calling convention is important.

  • Fix compilation
  • Fix link symbols

Fix for #3076

Comment on lines +15 to +19
typedef ThreadRoutineReturnType(WINAPI *ThreadStartRoutine)(void *);
#else
#include <pthread.h>
typedef void *ThreadRoutineReturnType;
typedef ThreadRoutineReturnType (*ThreadStartRoutine)(void *);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can define a no-op WINAPI when not using Windows and then use a single definition for easier maintenance in the future. Seems like we might need more of them in the glue layer anyway. Alternatively we can create OS_API (or something similar) that on Windows would be equal to WINAPI and no-op otherwise

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me check because I think this is only needed for Windows 32-bit which is the default when using the MSVC toolchain.

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

Successfully merging this pull request may close these issues.

None yet

2 participants