[Log4cplus-devel] [ log4cplus-Bugs-3568882 ] Unnamed semaphores are not supported on Mac OS X
Logging Framework for C++
Brought to you by:
wilx
From: SourceForge.net <no...@so...> - 2012-09-18 13:21:15
|
Bugs item #3568882, was opened at 2012-09-18 04:46 Message generated for change (Comment added) made by wilx You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=429073&aid=3568882&group_id=40830 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Appender Group: v1.1.x Status: Open Resolution: None Priority: 5 Private: No Submitted By: Christian Rüegg (rueegg) Assigned to: Václav Zeman (wilx) Summary: Unnamed semaphores are not supported on Mac OS X Initial Comment: use named semaphores. See: http://stackoverflow.com/questions/1413785/sem-init-on-os-x ---------------------------------------------------------------------- >Comment By: Václav Zeman (wilx) Date: 2012-09-18 06:21 Message: It seems that I could just use named semaphores on MacOS X instead. I do not want to use OS specific headers if I can avoid it. I'll see what I can do later today. Could you please give me the output of "echo | g++ -dD -E -" (or similar) command? ---------------------------------------------------------------------- Comment By: Christian Rüegg (rueegg) Date: 2012-09-18 05:14 Message: Taken from http://www.opensource.apple.com/source/freeradius/freeradius-36/freeradius/src/main/threads.c Please add surrounding ifdefs #include <mach/mach.h> #include <mach/task.h> #include <mach/semaphore.h> #undef sem_t #define sem_t semaphore_t #undef sem_init #define sem_init(s,p,c) semaphore_create(mach_task_self(),s,SYNC_POLICY_FIFO,c) #undef sem_wait #define sem_wait(s) semaphore_wait(*s) #undef sem_post #define sem_post(s) semaphore_signal(*s) #undef sem_destroy #define sem_destroy(s) semaphore_destroy(mach_task_self(),*s) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=429073&aid=3568882&group_id=40830 |