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

Add Macos support #15

Open
wants to merge 7 commits into
base: unity
Choose a base branch
from
Open

Conversation

blaztinn
Copy link

Update Makefile, includes and defines to support Macos.

Update also posix threading usage with macos specific spinlocks and
global namespace (but still exclusive) sempahores because macos is
lacking some posix functionality.

Instead of `pthread_spinlock_t` use `os_unfair_lock_t` because macos
is missing the pthread spinlock.

`sem_init` is deprecated on macos and always returns `-1`. Use
`sem_open` together with `sem_unlink` to open an exclusive sempahore in
global namespace.

Use `sem_wait` because `sem_timedWait` is missing on macos.
@illwieckz
Copy link

illwieckz commented Feb 10, 2023

Hi @blaztinn I'm trying to import your patches into DaemonEngine#33 (which already features many other fixes, you'll maybe interested in that crunch tree). It doesn't work yet on my end as there are some remaining errors though.

@illwieckz
Copy link

Hi @blaztinn we merged your fix in Dæmon engine's tree, this tree has also a lot of other fixes so you may be interested by it:

@blaztinn
Copy link
Author

Hi @blaztinn we merged your fix in Dæmon engine's tree, this tree has also a lot of other fixes so you may be interested by it:

* [import macOS fixes from blaztinn/macos DaemonEngine/crunch#33](https://github.com/DaemonEngine/crunch/pull/33)

Hi @illwieckz , thank you for letting me know about the other crunch tree. On the mobile games I work on we already moved to ASTC texture compression, but in case we need some fixes for crunch I'll be checking it out for sure!

I'm glad that my changes we're helpful to you and that you solved the build/link issues you had :)

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.

2 participants