
JOAQUIN M. LOPEZ MUÑOZ wrote:
A component of Boost.Flyweight called intermodule_holder internally uses some Boost.Interprocess objects with very long names intended to guarantee sistem-wide uniqueness. For instance, this is how such an internal mutex can be named (87 chars):
boost_flyweight_intermodule_holder_mutex_5660_601342046_2913549788_3054690985_591945496
Alas seems like 87 chars is too much in some platforms like NetBSD:
terminate called after throwing an instance of 'boost::interprocess::interprocess_exception' what(): File name too long
See http://tinyurl.com/6m693p . This problem also shows in some of Boost.Inteprocess own tests for NetBSD. Is there any maximum length we can safely commit to across allplatforms? (docs are silent wrt this).
I don't know if a portable scheme can be easily deduced. Just to be curious, does the C++ standard say anything about path or file name lengths? Maybe we should follow the same way. The path length depends on the filesystem type so finding a common scheme might be pretty difficult. Some operating system (embedded mainly) named objects require pretty short names, so I don't know what could be a portable length. Regards, Ion