diff mbox series

xen/types: Drop compatibility for GCC < 4.4

Message ID 20250328173623.892770-1-andrew.cooper3@citrix.com (mailing list archive)
State New
Headers show
Series xen/types: Drop compatibility for GCC < 4.4 | expand

Commit Message

Andrew Cooper March 28, 2025, 5:36 p.m. UTC
We now have compiler types for every standard type we use.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Anthony PERARD <anthony.perard@vates.tech>
CC: Michal Orzel <michal.orzel@amd.com>
CC: Jan Beulich <jbeulich@suse.com>
CC: Julien Grall <julien@xen.org>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
---
 xen/include/xen/stdint.h | 19 -------------------
 xen/include/xen/types.h  |  3 +--
 2 files changed, 1 insertion(+), 21 deletions(-)

Comments

Jan Beulich March 31, 2025, 6:35 a.m. UTC | #1
On 28.03.2025 18:36, Andrew Cooper wrote:
> We now have compiler types for every standard type we use.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>
diff mbox series

Patch

diff --git a/xen/include/xen/stdint.h b/xen/include/xen/stdint.h
index a40165c6ae33..dde12964bfe6 100644
--- a/xen/include/xen/stdint.h
+++ b/xen/include/xen/stdint.h
@@ -2,23 +2,6 @@ 
 #ifndef __XEN_STDINT_H__
 #define __XEN_STDINT_H__
 
-#ifndef __INT8_TYPE__ /* GCC <= 4.4 */
-
-/*
- * Define the types using GCC internal notation.  Clang understands this too.
- * https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html
- */
-typedef   signed __attribute__((__mode__(__QI__)))     int8_t;
-typedef unsigned __attribute__((__mode__(__QI__)))    uint8_t;
-typedef   signed __attribute__((__mode__(__HI__)))    int16_t;
-typedef unsigned __attribute__((__mode__(__HI__)))   uint16_t;
-typedef   signed __attribute__((__mode__(__SI__)))    int32_t;
-typedef unsigned __attribute__((__mode__(__SI__)))   uint32_t;
-typedef   signed __attribute__((__mode__(__DI__)))    int64_t;
-typedef unsigned __attribute__((__mode__(__DI__)))   uint64_t;
-
-#else
-
 typedef __INT8_TYPE__        int8_t;
 typedef __UINT8_TYPE__      uint8_t;
 typedef __INT16_TYPE__      int16_t;
@@ -28,6 +11,4 @@  typedef __UINT32_TYPE__    uint32_t;
 typedef __INT64_TYPE__      int64_t;
 typedef __UINT64_TYPE__    uint64_t;
 
-#endif
-
 #endif /* __XEN_STDINT_H__ */
diff --git a/xen/include/xen/types.h b/xen/include/xen/types.h
index 543bfb2159b1..e8d419b95412 100644
--- a/xen/include/xen/types.h
+++ b/xen/include/xen/types.h
@@ -17,6 +17,7 @@  typedef __SIZE_TYPE__ size_t;
 typedef signed long ssize_t;
 
 typedef __PTRDIFF_TYPE__ ptrdiff_t;
+typedef __UINTPTR_TYPE__ uintptr_t;
 
 /*
  * Users of this macro are expected to pass a positive value.
@@ -58,8 +59,6 @@  typedef uint32_t __be32;
 typedef uint64_t __le64;
 typedef uint64_t __be64;
 
-typedef unsigned int __attribute__((__mode__(__pointer__))) uintptr_t;
-
 #define test_and_set_bool(b)   xchg(&(b), true)
 #define test_and_clear_bool(b) xchg(&(b), false)