2009/9/13 Ion Gaztaņaga <igaztanaga@gmail.com>
Interprocess supposes that if shm_open needs path-based names(POSIX allows that), sem_open also needs them, so try to comment this line in inteprocess/detail/workaround.hpp:

  #ifdef BOOST_INTERPROCESS_POSIX_NAMED_SEMAPHORES
     #if defined(BOOST_INTERPROCESS_FILESYSTEM_BASED_POSIX_RESOURCES)
//THIS-> #define BOOST_INTERPROCESS_FILESYSTEM_BASED_POSIX_SEMAPHORES
     #endif
  #endif

And let's see if simple "/name" names are what hpux needs for sems.

This solved the problem. Thank you!

I'm glad to say that after some additional work all tests have passed.

Apart from the problem with named_mutex test, there were other tests failing: a) file_mapping_test, message_queue_test, named_condition_test, named_recursive_mutex_test and a few others, all failed with the same error: ENOMEM; b) shared_ptr_test was also failing because of an error in the call to __sync_val_compare_and_swap. 

Here is what I've done to solve these problems:

a) The problem was due to limitations on the default HP-UX address space model. See  http://h20338.www2.hp.com/hpux11i/downloads/aas_white_paper.pdf (page 9). Based on this information I solved the problem by adding this line to file Jamfile.v2, after line 29:

<host-os>hpux,<toolset>gcc:<linkflags>"-Wl,+as,mpas"

b) The problem here was the wrong order of the parameters passed to method __sync_val_compare_and_swap (in detail::atomic_cas32):
wrong: __sync_val_compare_and_swap(const_cast<boost::uint32_t *>(mem), with, cmp)
correct: __sync_val_compare_and_swap(const_cast<boost::uint32_t *>(mem), cmp, with)

After these fixes, we can say boost.interprocess works fine in HP-UX with gcc44.

Thank you very much for you patience and valuable help.

Best regards,
Rui