[ace-users] [autotools] POSIX named semaphore detection fix

Thomas Girard thomas.g.girard at free.fr
Thu Aug 9 14:14:44 CDT 2007


Le mardi 24 juillet 2007 à 11:10 -0400, Caleb Epstein a écrit : 
> I recently rebuilt ACE using the configure script and found that the
> resulting config.h had (mistakenly) decided that ACE_OS::fast_memcpy
> was faster than ::memcpy (it isn't, by a factor of about 3) and that
> my system had no SysV named semaphore operations (it does). 

Assuming you were referring to POSIX named semaphores, I have been able
to recreate the described error by running configure twice.

Indeed in the sem_open test, the created semaphore is not unlinked,
hence the next time the test is run the call to:
  sem_open ("ace_semaphore_foo", O_CREAT | O_EXCL, 0600, 1);
fails because the named semaphore already exist.

The attached patch unlinks the created semaphore if everything goes
fine. It can be applied to the 5.5.10 version or the SVN repo (as of


-------------- next part --------------
A non-text attachment was scrubbed...
Name: autoconf-sem_open-fix.diff
Type: text/x-patch
Size: 263 bytes
Desc: not available
Url : http://list.isis.vanderbilt.edu/pipermail/ace-users/attachments/20070809/d257427e/autoconf-sem_open-fix.bin

More information about the Ace-users mailing list