mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
OS X compatibility fixes
This commit is contained in:
parent
ee7af21e41
commit
c410e9182d
10 changed files with 158 additions and 31 deletions
|
@ -24,6 +24,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include <windows.h>
|
||||
#include <assert.h>
|
||||
#define MAX_SEMAPHORE_COUNT 1024
|
||||
#elif __MACH__
|
||||
#include <pthread.h>
|
||||
#include <mach/mach.h>
|
||||
#include <mach/task.h>
|
||||
#include <mach/semaphore.h>
|
||||
#include <sys/semaphore.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#include <semaphore.h>
|
||||
|
@ -44,9 +52,13 @@ public:
|
|||
private:
|
||||
#if defined(WIN32)
|
||||
HANDLE m_hSemaphore;
|
||||
#elif __MACH__
|
||||
semaphore_t m_semaphore;
|
||||
#else
|
||||
sem_t m_semaphore;
|
||||
#endif
|
||||
int semcount;
|
||||
};
|
||||
|
||||
|
||||
#endif /* JSEMAPHORE_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue