Skip to content

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

Description

@lakezhong

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions