<div dir="ltr">But the WESTON_VERSION_AT_LEAST macro is wrong. You can check only the minor and not the rest of the version.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/23 Kristian Høgsberg <span dir="ltr"><<a href="mailto:hoegsberg@gmail.com" target="_blank">hoegsberg@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, Sep 23, 2013 at 10:39:08AM -0700, Kristian Høgsberg wrote:<br>
> On Mon, Sep 23, 2013 at 07:26:03AM +0200, Pier Luigi Fiorini wrote:<br>
> > Make it easier to check for a Weston version.<br>
><br>
> Ah yup, I lost track of that one. Thanks, committed.<br>
><br>
> Kristian<br>
><br>
> > ---<br>
> > src/<a href="http://version.h.in" target="_blank">version.h.in</a> | 12 +++++++++++-<br>
> > 1 file changed, 11 insertions(+), 1 deletion(-)<br>
> ><br>
> > diff --git a/src/<a href="http://version.h.in" target="_blank">version.h.in</a> b/src/<a href="http://version.h.in" target="_blank">version.h.in</a><br>
> > index f573328..d45172c 100644<br>
> > --- a/src/<a href="http://version.h.in" target="_blank">version.h.in</a><br>
> > +++ b/src/<a href="http://version.h.in" target="_blank">version.h.in</a><br>
> > @@ -26,6 +26,16 @@<br>
> > #define WESTON_VERSION_MAJOR @WESTON_VERSION_MAJOR@<br>
> > #define WESTON_VERSION_MINOR @WESTON_VERSION_MINOR@<br>
> > #define WESTON_VERSION_MICRO @WESTON_VERSION_MICRO@<br>
> > -#define WESTON_VERSION "@WESTON_VERSION@"<br>
> > +<br>
> > +#define WESTON_VERSION ((WESTON_VERSION_MAJOR << 16) | (WESTON_VERSION_MINOR << 8) | (WESTON_VERSION_MICRO))<br>
> > +#define WESTON_VERSION_STR "@WESTON_VERSION@"<br>
> > +<br>
> > +/*<br>
> > + Can be used like #if (WESTON_VERSION >= WESTON_VERSION_AT_LEAST(1, 2, 0))<br>
> > +*/<br>
> > +#define WESTON_VERSION_AT_LEAST(major, minor, micro) \<br>
> > + (WESTON_VERSION_MAJOR == (major) && \<br>
> > + WESTON_VERSION_MINOR == (minor) && \<br>
> > + WESTON_VERSION_MICRO >= (micro))<br>
<br>
</div></div>Actually, I trimmed the patch to be just the WESTON_VERSION_AT_LEAST<br>
macro. WESTON_VERSION is still the version string and I updated the<br>
comment to say<br>
<br>
/* Can be used like #if WESTON_VERSION_AT_LEAST(1, 2, 0) */<br>
<span class="HOEnZb"><font color="#888888"><br>
Kristian<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> ><br>
> > #endif<br>
> > --<br>
> > 1.8.3.1<br>
> ><br>
> > _______________________________________________<br>
> > wayland-devel mailing list<br>
> > <a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
> > <a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</div></div></blockquote></div><br></div>