On 12/01/2023 2:01 pm, Jan Beulich wrote:
> size_t, ssize_t, and ptrdiff_t are all expected to be uniformly defined
> on any ports Xen might gain. In particular I hope new ports can rely on
> __SIZE_TYPE__ and __PTRDIFF_TYPE__ being made available by the compiler.
>
> Signed-off-by: Jan Beulich <[email protected]>

Acked-by: Andrew Cooper <[email protected]>

Thankyou for starting this.

> ---
> This is just to start with some hopefully uncontroversial low hanging fruit.

However, I'd advocate going one step further and making real a
xen/stddef.h header to match our existing stdboot and stdarg, now that
we have fully divorced ourselves from the compiler-provided freestanding
headers.

This way, the type are declared in the usual place in a C environment.

I was then also going to use this approach to start breaking up
xen/lib.h which is a dumping ground of far too much stuff.  In
particular, when we have a stddef.h, I think it is entirely reasonable
to move things like ARRAY_SIZE/count_args()/etc into it, because they
are entirely standard in the Xen codebase.

~Andrew

Reply via email to