On 12/02/2019 15:26, Ian Jackson wrote: > >> But if we really want to have ptrdiff_t, then I think we should either >> follow the uintptr_t model and use attribute((mode())), or we should >> leverage the compiler's __PTRDIFF_TYPE__ (and then also >> __UINTPTR_TYPE__ for uintptr_t, at least if available - not sure what >> its availability depends on, but it's conditional in gcc's >> c_stddef_cpp_builtins()). > It is not unusual for porting something like Xen to a new architecture > to involve writing a short header file with these kind of type > definitions. I don't know why we couldn't take that approach.
stdint.h and inttypes.h are a freestanding header files, and are intended for uses just like this. Lets stop second guessing our build environment, and use the solution to the problem given to us by the C specification. And to be crystal clear. This means including <stdint.h> and <inttypes.h> in xen/types.h and deleting all of these typedefs ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel