>>> On 28.09.17 at 12:59, <andrew.coop...@citrix.com> wrote: > --- /dev/null > +++ b/include/xtf/compiler-gcc.h > @@ -0,0 +1,31 @@ > +#ifndef XTF_COMPILER_GCC_H > +#define XTF_COMPILER_GCC_H > + > +#define GCC_VER (__GNUC__ * 10000 + \ > + __GNUC_MINOR__ * 100 + \ > + __GNUC_PATCHLEVEL__) > + > +/* > + * The Clang __has_*() infrastructure is a very clean way to identify > + * compiler support, without resorting to version checks. Fake up > + * enough support for XTF code to use, even on non-clang compilers. > + */ > + > +#ifndef __has_extension > + > +#define GCC_HAS_c_static_assert (GCC_VER >= 40600) /* _Static_assert() */ > + > +#define __has_extension(x) GCC_HAS_ ## x
As always I'd recommend against underscore prefixed names. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel