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

pureMVC-cpp-multicore can not build in Cygwin #3

Open
lakezhong opened this issue May 25, 2015 · 2 comments
Open

pureMVC-cpp-multicore can not build in Cygwin #3

lakezhong opened this issue May 25, 2015 · 2 comments

Comments

@lakezhong
Copy link

my solution is:

first solution: change PureMVC.cpp

from:

if defined(APPLE)

define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE

endif

to:

if defined(APPLE) || defined(CYGWIN)

define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE

endif

second solution: change PureMVC.cpp, int Mutex::Mutex(void)

from:
::pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);

to:

if defined(PTHREAD_MUTEX_RECURSIVE_NP)

::pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);

else

::pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);

endif

I don't know which is better.

@cliffhall
Copy link
Member

The first is less intrusive, I'd go with that. If you want to make a pull request, I'll accept it.

@heyxiaohao
Copy link

read the HowToBuild.txt

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

3 participants