[HarfBuzz] thread-related warnings

Jonathan Kew jonathan at jfkew.plus.com
Mon Feb 13 03:55:38 PST 2012


Hi Behdad,

In our build (where we don't currently need to use harfbuzz across threads), we get warnings from hb-{mutex,object}-private.hh:

> > /builds/harfbuzz-update/gfx/harfbuzz/src/hb-mutex-private.hh:69:2: warning: #warning "Could not find any system to define platform macros, library will NOT be thread-safe"
> > /builds/harfbuzz-update/gfx/harfbuzz/src/hb-object-private.hh:81:2: warning: #warning "Could not find any system to define atomic_int macros, library will NOT be thread-safe"

It would be nice if we could suppress these (without having to either provide the thread-safety support that we don't need, or hack the actual harfbuzz code we pull from upstream).

It also might be useful for other clients to have the option of building _without_ these features, even in an environment (e.g. with glib) where they're readily available. What would you think of adding a HB_SINGLE_THREADED macro (for example), which could be defined in order to completely skip this stuff?

Thanks,

JK




More information about the HarfBuzz mailing list