xen/public: replace typeof() with __typeof__()
authorElliott Mitchell <ehem+xen@m5p.com>
Mon, 8 Mar 2021 13:36:18 +0000 (05:36 -0800)
committerJulien Grall <jgrall@amazon.com>
Thu, 11 Mar 2021 09:51:07 +0000 (09:51 +0000)
commit935e0836710ce8cab584155b2844cea8497a5159
treed6e8189e580d95479c4734261c7dd1b855c02adb
parent1fff444679a1ffa67d0bf55744b80555ab58f9f8
xen/public: replace typeof() with __typeof__()

typeof() is available in Xen's build environment, which uses Xen's
compiler.  As these headers are public, they need strict standards
conformance.  Only __typeof__() is officially standardized.

A compiler in standards conformance mode should report:

warning: implicit declaration of function 'typeof' is invalid in C99
[-Wimplicit-function-declaration]

(this has been observed with FreeBSD's kernel build environment)

Based-on-patch-by: Julien Grall <julien@xen.org>, Sun Oct 4 20:33:04 2015 +0100
Signed-off-by: Elliott Mitchell <ehem+xen@m5p.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Juergen Gross <jgross@suse.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
xen/include/public/arch-arm.h
xen/include/public/hvm/save.h
xen/include/public/io/ring.h