* Christoph Hellwig (hch at infradead.org) wrote: > We could have a local include/uatomic.h that includes either based on > which one is available, still erroring out if none is present. > > I've cced the LTTng list to se if using the old uatomic_arch.h header > from outside librcu is something we should do at all. Hi Christoph, Hrm, 0.4.1 is really old (2010-02-12). We did migrate some header names and clean up some API namespacing back then between 0.4 and 0.5, so we would not have to do it when the project would get more exposure. In terms of way forward, we were planning to remove urcu/uatomic_arch.h after a rather long deprecation period, being replaced by urcu/uatomic.h. As you noticed, there has been a deprecation #warning in place since the move has been done. If you want to keep compatibility with the old 0.4.x version of liburcu for a longer time, my recommendation would be to add a configure.ac check for urcu/uatomic.h. It it is missing, then check for urcu/uatomic_arch.h. This would specify a preprocessor macro that will select either in a wrapper header within the sheepdog project. If you only rely on uatomic, doing so should handle deprecation of the older liburcu 0.4.x support within sheepdog at some point in the future if need be. It's good to be aware that between 0.4.x and 0.5, a namespace cleanup for all the smp_*mb() went in: those are now all prefixed with "cmm_", e.g. cmm_smp_mb(). Same for a few other API members that were clashing with private project namespaces (all documented in the ChangeLog). uatomic_*() already had its namespace, so it did not need to be changed. If in the future sheepdog starts using features for which the namespace changed at 0.5, you might want to consider dropping support for liburcu 0.4.x. Whether you decide on just bailing out is urcu/uatomic.h is not found or use a detection macro is up to you, and depends on how far back you want to support old distros. Thanks! Mathieu > > On Sun, May 20, 2012 at 09:17:39PM +0800, Liu Yuan wrote: > > On 05/20/2012 10:59 AM, MORITA Kazutaka wrote: > > > > > > > > On my environment (debian squeeze), the package version of liburcu is > > > too old (0.4.1) and I cannot compile the latest sheepdog because > > > urcu/uatomic.h is missing. > > > > > > Is there any way to build Sheepdog with the older version of liburcu? > > > If no, we'd better check the existence of urcu/uatomic.h. > > > > > > urcu/uatomic_arch.h might be the compatible header to include, but it > > will issue a annoying warning for a recent version like following: > > > > /usr/include/urcu/uatomic_arch.h:1: warning: #warning > > "urcu/uatomic_arch.h is deprecated. Please include urcu/uatomic.h instead." > > > > Maybe we can use complex macros to check urcu version to get rid of this > > warning, but I think would be better use your patch directly to simplify > > the thing. > > > > Thanks, > > Yuan > > -- > > sheepdog mailing list > > sheepdog at lists.wpkg.org > > http://lists.wpkg.org/mailman/listinfo/sheepdog > ---end quoted text--- > > _______________________________________________ > lttng-dev mailing list > lttng-dev at lists.lttng.org > http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -- Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com |