aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2022-08-28 00:10:45 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-08-28 01:15:48 +0200
commitc566ad85a2d6728ebc8ec0f461a3b35df300e96e (patch)
tree2b2ed31e04e74c84ce1925df6db1dc809fb57625 /include
parent7d642c99641ffc6960c8dd9ea88634bdaae80213 (diff)
downloadgnumach-c566ad85a2d6728ebc8ec0f461a3b35df300e96e.tar.gz
gnumach-c566ad85a2d6728ebc8ec0f461a3b35df300e96e.tar.bz2
gnumach-c566ad85a2d6728ebc8ec0f461a3b35df300e96e.zip
Fix inclusability of <mach/mach_types.h>
Now that mach/machine/vm_types.h uses stdint types, we have to ship a header that defines them.
Diffstat (limited to 'include')
-rw-r--r--include/stdint.h39
1 files changed, 14 insertions, 25 deletions
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 <mach/machine/stdint.h>
+
+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_ */