Curt Arnold wrote:

Another solution is to typedef the main types we use in threading, depending on PTHREAD (not HAVE_PTHREAD), and WIN32. This will require the library user to add -DPTHREAD on it's compiler command line, which is not a problem I think (a lot of other library do).
For example in portability.h, having:

The mechanism used for critical sections is an implementation detail that is ideally invisible to the client application. I think it is much more preferable to hide that implementation detail than to make the build for the client application guess the value used to build the library.

Ok then let's go for pimpl. I'll keep you informed.

Cheers,

Christophe

Reply via email to