All supported compilers have these types.
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Wei Liu <wl@xen.org>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Julien Grall <julien@xen.org>
CC: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
CC: Bertrand Marquis <bertrand.marquis@arm.com>
CC: Bob Eshleman <bobbyeshleman@gmail.com>
CC: Alistair Francis <alistair.francis@wdc.com>
CC: Connor Davis <connojdavis@gmail.com>
CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
CC: Shawn Anastasio <sanastasio@raptorengineering.com>
CC: Timothy Pearson <tpearson@raptorengineering.com>
https://godbolt.org/z/Y6PWcd6js
---
xen/include/xen/types.h | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/xen/include/xen/types.h b/xen/include/xen/types.h
index 6aba80500aaf..8b22a02eeaa4 100644
--- a/xen/include/xen/types.h
+++ b/xen/include/xen/types.h
@@ -5,18 +5,11 @@
#include <asm/types.h>
-#if defined(__SIZE_TYPE__)
typedef __SIZE_TYPE__ size_t;
-#else
-typedef unsigned long size_t;
-#endif
+
typedef signed long ssize_t;
-#if defined(__PTRDIFF_TYPE__)
typedef __PTRDIFF_TYPE__ ptrdiff_t;
-#else
-typedef signed long ptrdiff_t;
-#endif
#define BITS_TO_LONGS(bits) \
(((bits)+BITS_PER_LONG-1)/BITS_PER_LONG)
--
2.30.2
On 21.06.2023 23:11, Andrew Cooper wrote: > All supported compilers have these types. > > No functional change. > > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
On Thu, Jun 22, 2023 at 7:12 AM Andrew Cooper <andrew.cooper3@citrix.com> wrote: > > All supported compilers have these types. > > No functional change. > > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Alistair > --- > CC: Jan Beulich <JBeulich@suse.com> > CC: Roger Pau Monné <roger.pau@citrix.com> > CC: Wei Liu <wl@xen.org> > CC: Stefano Stabellini <sstabellini@kernel.org> > CC: Julien Grall <julien@xen.org> > CC: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com> > CC: Bertrand Marquis <bertrand.marquis@arm.com> > CC: Bob Eshleman <bobbyeshleman@gmail.com> > CC: Alistair Francis <alistair.francis@wdc.com> > CC: Connor Davis <connojdavis@gmail.com> > CC: Oleksii Kurochko <oleksii.kurochko@gmail.com> > CC: Shawn Anastasio <sanastasio@raptorengineering.com> > CC: Timothy Pearson <tpearson@raptorengineering.com> > > https://godbolt.org/z/Y6PWcd6js > --- > xen/include/xen/types.h | 9 +-------- > 1 file changed, 1 insertion(+), 8 deletions(-) > > diff --git a/xen/include/xen/types.h b/xen/include/xen/types.h > index 6aba80500aaf..8b22a02eeaa4 100644 > --- a/xen/include/xen/types.h > +++ b/xen/include/xen/types.h > @@ -5,18 +5,11 @@ > > #include <asm/types.h> > > -#if defined(__SIZE_TYPE__) > typedef __SIZE_TYPE__ size_t; > -#else > -typedef unsigned long size_t; > -#endif > + > typedef signed long ssize_t; > > -#if defined(__PTRDIFF_TYPE__) > typedef __PTRDIFF_TYPE__ ptrdiff_t; > -#else > -typedef signed long ptrdiff_t; > -#endif > > #define BITS_TO_LONGS(bits) \ > (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG) > -- > 2.30.2 > >
© 2016 - 2026 Red Hat, Inc.