[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 2/4] xen: introduce a C99 headers check
>>> On 29.03.17 at 00:08, <sstabellini@xxxxxxxxxx> wrote: > Introduce a C99 headers check, for non-ANSI compliant headers: 9pfs.h > and pvcalls.h. > > In addition to the usual -include stdint.h, also add -include string.h > to the C99 check to get the declaration of memcpy and size_t. No, as explained before. You shouldn't think of just your new headers, but others which may later join the party. > --- a/xen/include/Makefile > +++ b/xen/include/Makefile > @@ -90,11 +90,16 @@ compat/xlat.h: $(addprefix compat/.xlat/,$(xlat-y)) > Makefile > > ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_ARCH)) > > -all: headers.chk headers++.chk > +all: headers.chk headers99.chk headers++.chk > > PUBLIC_HEADERS := $(filter-out public/arch-% public/dom0_ops.h, $(wildcard > public/*.h public/*/*.h) $(public-y)) > > -PUBLIC_ANSI_HEADERS := $(filter-out public/%ctl.h public/xsm/% > public/%hvm/save.h, $(PUBLIC_HEADERS)) > +PUBLIC_C99_HEADERS := > +PUBLIC_ANSI_HEADERS := $(filter-out public/%ctl.h public/xsm/% > public/%hvm/save.h $(PUBLIC_C99_HEADERS), $(PUBLIC_HEADERS)) > + > +EXTRA_PREREQ_C99 := -include string.h > +EXTRA_PREREQ_CPP := -include cstring These should be per header, e.g. pvcalls.h-c99-prereq := string.h pvcalls.h-cxx-prereq := cstring which will also (I think at least) greatly simplify the adjustments needed further down). Implied from this - please don't use CPP for C++, as CPP is commonly used for the preprocessor. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |