aboutsummaryrefslogtreecommitdiff
path: root/i386/include
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2022-12-18 19:48:24 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-12-19 01:57:21 +0100
commitb4b653a500199ab6d61318b0b0093567155089cd (patch)
treec1d100e0bf6cd2a90f4e227b30fd1959574801b3 /i386/include
parent3b097978c147d6e98f02e7b2d31e75a36e36338f (diff)
downloadgnumach-b4b653a500199ab6d61318b0b0093567155089cd.tar.gz
gnumach-b4b653a500199ab6d61318b0b0093567155089cd.tar.bz2
gnumach-b4b653a500199ab6d61318b0b0093567155089cd.zip
Remove custom stdint.h and rely on freestanding headers
GCC already provides this so we don't need to have our own. Message-Id: <Y5+02FVA6jf4GPgA@mars>
Diffstat (limited to 'i386/include')
-rw-r--r--i386/include/mach/i386/stdint.h55
-rw-r--r--i386/include/mach/i386/vm_types.h34
2 files changed, 18 insertions, 71 deletions
diff --git a/i386/include/mach/i386/stdint.h b/i386/include/mach/i386/stdint.h
deleted file mode 100644
index 5336400d..00000000
--- a/i386/include/mach/i386/stdint.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2016 Free Software Foundation, Inc.
- *
- * This file is part of GNU Mach.
- *
- * GNU Mach is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any later
- * version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef _MACH_MACHINE_STDINT_H_
-#define _MACH_MACHINE_STDINT_H_
-
-/*
- * These types are _exactly_ as wide as indicated in their names.
- */
-
-typedef char __mach_int8_t;
-typedef short __mach_int16_t;
-typedef int __mach_int32_t;
-#if __x86_64__
-typedef long int __mach_int64_t;
-#else
-typedef long long int __mach_int64_t;
-#endif /* __x86_64__ */
-
-typedef unsigned char __mach_uint8_t;
-typedef unsigned short __mach_uint16_t;
-typedef unsigned int __mach_uint32_t;
-#if __x86_64__
-typedef unsigned long int __mach_uint64_t;
-#else
-typedef unsigned long long int __mach_uint64_t;
-#endif /* __x86_64__ */
-
-/* Types for `void *' pointers. */
-#if __x86_64__
-typedef long int __mach_intptr_t;
-typedef unsigned long int __mach_uintptr_t;
-#else
-typedef int __mach_intptr_t;
-typedef unsigned int __mach_uintptr_t;
-#endif /* __x86_64__ */
-
-#endif /* _MACH_MACHINE_STDINT_H_ */
diff --git a/i386/include/mach/i386/vm_types.h b/i386/include/mach/i386/vm_types.h
index bb43a9fb..4522f48b 100644
--- a/i386/include/mach/i386/vm_types.h
+++ b/i386/include/mach/i386/vm_types.h
@@ -37,7 +37,7 @@
#ifdef __ASSEMBLER__
#else /* __ASSEMBLER__ */
-#include <mach/machine/stdint.h>
+#include <stdint.h>
#ifdef MACH_KERNEL
#include <kern/assert.h>
@@ -78,7 +78,7 @@ typedef long long_integer_t;
* A vm_offset_t is a type-neutral pointer,
* e.g. an offset into a virtual memory space.
*/
-typedef __mach_uintptr_t vm_offset_t;
+typedef uintptr_t vm_offset_t;
typedef vm_offset_t * vm_offset_array_t;
/*
@@ -100,7 +100,7 @@ typedef unsigned long long rpc_phys_addr_t;
* expressing the difference between two
* vm_offset_t entities.
*/
-typedef __mach_uintptr_t vm_size_t;
+typedef uintptr_t vm_size_t;
typedef vm_size_t * vm_size_array_t;
/*
@@ -110,32 +110,34 @@ typedef vm_size_t * vm_size_array_t;
* functions.
*/
#if defined(MACH_KERNEL) && defined(USER32)
-typedef __mach_uint32_t rpc_vm_address_t;
-typedef __mach_uint32_t rpc_vm_offset_t;
-typedef __mach_uint32_t rpc_vm_size_t;
+typedef uint32_t rpc_vm_address_t;
+typedef uint32_t rpc_vm_offset_t;
+typedef uint32_t rpc_vm_size_t;
-static inline __mach_uint64_t convert_vm_from_user(__mach_uint32_t uaddr)
+static inline uint64_t convert_vm_from_user(uint32_t uaddr)
{
- return (__mach_uint64_t)uaddr;
+ return (uint64_t)uaddr;
}
-static inline __mach_uint32_t convert_vm_to_user(__mach_uint64_t kaddr)
+static inline uint32_t convert_vm_to_user(uint64_t kaddr)
{
assert(kaddr <= 0xFFFFFFFF);
- return (__mach_uint32_t)kaddr;
+ return (uint32_t)kaddr;
}
-typedef __mach_uint32_t rpc_long_natural_t;
-typedef __mach_int32_t rpc_long_integer_t;
+typedef uint32_t rpc_long_natural_t;
+typedef int32_t rpc_long_integer_t;
-static inline __mach_int64_t convert_long_integer_from_user(__mach_int32_t i)
+static inline int64_t convert_long_integer_from_user(int32_t i)
{
- return (__mach_int64_t)i;
+ return (int64_t)i;
}
-static inline __mach_int32_t convert_long_integer_to_user(__mach_int64_t i)
+static inline int32_t convert_long_integer_to_user(int64_t i)
{
assert(i <= 0x7FFFFFFF);
- return (__mach_int32_t)i;
+ return (int32_t)i;
}
+typedef uint32_t rpc_long_natural_t;
+typedef int32_t rpc_long_integer_t;
#else /* MACH_KERNEL */
typedef vm_offset_t rpc_vm_address_t;
typedef vm_offset_t rpc_vm_offset_t;