From c566ad85a2d6728ebc8ec0f461a3b35df300e96e Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 28 Aug 2022 00:10:45 +0200 Subject: Fix inclusability of Now that mach/machine/vm_types.h uses stdint types, we have to ship a header that defines them. --- include/stdint.h | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) (limited to 'include/stdint.h') diff --git a/include/stdint.h b/include/stdint.h index bea277ec..55c7ab22 100644 --- a/include/stdint.h +++ b/include/stdint.h @@ -7,12 +7,12 @@ * 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. @@ -25,31 +25,20 @@ * These types are _exactly_ as wide as indicated in their names. */ -typedef char int8_t; -typedef short int16_t; -typedef int int32_t; -#if __x86_64__ -typedef long int int64_t; -#else -typedef long long int int64_t; -#endif /* __x86_64__ */ +#include + +typedef __mach_int8_t int8_t; +typedef __mach_int16_t int16_t; +typedef __mach_int32_t int32_t; +typedef __mach_int64_t int64_t; -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -#if __x86_64__ -typedef unsigned long int uint64_t; -#else -typedef unsigned long long int uint64_t; -#endif /* __x86_64__ */ +typedef __mach_uint8_t uint8_t; +typedef __mach_uint16_t uint16_t; +typedef __mach_uint32_t uint32_t; +typedef __mach_uint64_t uint64_t; /* Types for `void *' pointers. */ -#if __x86_64__ -typedef long int intptr_t; -typedef unsigned long int uintptr_t; -#else -typedef int intptr_t; -typedef unsigned int uintptr_t; -#endif /* __x86_64__ */ +typedef __mach_intptr_t intptr_t; +typedef __mach_uintptr_t uintptr_t; #endif /* _STDINT_H_ */ -- cgit v1.2.3