|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 2/4] xen: introduce a C99 headers check
>>> On 24.03.17 at 19:31, <sstabellini@xxxxxxxxxx> wrote:
> Introduce a C99 headers check, for non-ANSI compliant headers. No
> headers are added to the check yet.
>
> 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.
Is this really needed for the check to succeed, without there being
any user of the macros?
> For the same reasons, also add -include string.h to the C++ check.
Same here then.
> @@ -104,18 +105,26 @@ headers.chk: $(PUBLIC_ANSI_HEADERS) Makefile
> done >$@.new
> mv $@.new $@
>
> +headers99.chk: $(PUBLIC_C99_HEADERS) Makefile
> + for i in $(filter %.h,$^); do \
> + $(CC) -x c -std=c99 -Wall -Werror -include stdint.h \
> + -include string.h -S -o /dev/null $$i || exit 1; \
> + echo $$i; \
> + done >$@.new
> + mv $@.new $@
> +
> headers++.chk: $(PUBLIC_HEADERS) Makefile
> if $(CXX) -v >/dev/null 2>&1; then \
> for i in $(filter %.h,$^); do \
> echo '#include "'$$i'"' \
> | $(CXX) -x c++ -std=gnu++98 -Wall -Werror -D__XEN_TOOLS__ \
> - -include stdint.h -include public/xen.h -S -o /dev/null - \
> + -include stdint.h -include string.h -include public/xen.h \
> + -S -o /dev/null - \
> || exit 1; \
> echo $$i; \
> done ; \
> fi >$@.new
> mv $@.new $@
> -
> endif
Please don't remove blank lines like this.
> @@ -128,5 +137,5 @@ all: $(BASEDIR)/include/asm-x86/cpuid-autogen.h
> endif
>
> clean::
> - rm -rf compat headers.chk headers++.chk
> + rm -rf compat headers.chk headers99.chk headers++.chk
rm -rf compat headers*.chk
? Plus a respective ./.gitignore adjustment.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |