We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 179 - SDL_SemValue() always returns 0 on Mac OS X
Summary: SDL_SemValue() always returns 0 on Mac OS X
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: thread (show other bugs)
Version: HG 1.2
Hardware: PowerPC Mac OS X (All)
: P2 minor
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-25 03:10 UTC by Christian Walther
Modified: 2006-04-14 09:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Walther 2006-03-25 03:10:22 UTC
SDL_SemValue() always returns 0. That's because the underlying POSIX sem_getvalue() is implemented as a noop in Mac OS X. Apart from that, semaphores do work properly (at least according to test/testsem), so I'm not sure if this is worth fixing at all.

Interestingly, the release notes for SDL 1.1.8 say "Worked around broken sem_getvalue() on MacOS X". How was that done? I can't find the source for 1.1.8 in the CVS.
Comment 1 Sam Lantinga 2006-04-13 10:04:22 UTC
I think this is fixed in CVS, can you take a look?
Comment 2 Christian Walther 2006-04-14 09:34:29 UTC
Yep, seems to work.

By the way, I had to make the following change to SDL_config_macosx.h to make SDL compile in Xcode (because of http://libsdl.org/cgi/cvsweb.cgi/SDL12/src/loadso/macosx/SDL_sysloadso.c.diff?r1=1.5&r2=1.6), is this the right thing to do?

 /* Enable various shared object loading systems */
-#define SDL_LOADSO_DLOPEN      1
+#define SDL_LOADSO_DLCOMPAT    1