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

Adjustments for compilation on MSVC and windows compilers in general #5

Merged
merged 6 commits into from
Sep 1, 2014
Merged

Adjustments for compilation on MSVC and windows compilers in general #5

merged 6 commits into from
Sep 1, 2014

Conversation

danielgindi
Copy link
Contributor

You have a strong dependency on UNIX functions and compilers, and compiling for windows using the MINGW32.
I just wanted to allow a more graceful compatibility for windows, without the MINGW32 dependency.
Now it works :-)

That's because there are duplicate #defines, and when Winsock2 is defined before windows.h then windows.h detects that and prevent redefinition.
That is the official way stated by Microsoft.
…pilers, MSVC, MINGW32 and other. It even works for x64 and Itanium...
…ilers, because of the size by which it needs to increment/decrement is unknown. We need to define char* in order to increment by measures of 8 bits.
I have added a MACRO that uses either CRITICAL_SECTION or pthread_mutex depeneding on whether it's windows or unix.
And because a CRITICAL_SECTION has the bonus of being recursive by default, I've added the recursive attribute to the pthread mutexes.
bk138 added a commit that referenced this pull request Sep 1, 2014
Adjustments for compilation on MSVC and windows compilers in general
@bk138 bk138 merged commit 936d7b5 into bk138:master Sep 1, 2014
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