diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2016-03-30 02:26:28 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-04-04 09:36:36 +0200 |
commit | 7bbfa39f59dcbc55b21d31abb9e2febef6a51ebb (patch) | |
tree | 840a881ede29701996d51a94272b4da3115e3412 /include/stdint.h | |
parent | a90dc34f976cd37da23af526120f2ac480cb131f (diff) | |
download | gnumach-7bbfa39f59dcbc55b21d31abb9e2febef6a51ebb.tar.gz gnumach-7bbfa39f59dcbc55b21d31abb9e2febef6a51ebb.tar.bz2 gnumach-7bbfa39f59dcbc55b21d31abb9e2febef6a51ebb.zip |
Use uint32_t instead of unsigned32_t.
Implement stdint.h and use it in gnumach.
Remove old type definitions such as signed* and unsigned*.
* Makefile.am: Add -ffreestanding.
* i386/i386/xen.h: Use uint64_t.
* i386/include/mach/i386/machine_types.defs: Use uint32_t and int32_t.
* i386/include/mach/i386/vm_types.h: Remove definitions of int*, uint*,
unsigned* and signed* types.
* i386/xen/xen.c: Use uint64_t.
* include/device/device_types.defs: Use uint32_t.
* include/mach/std_types.defs: Use POSIX types.
* include/mach/std_types.h: Include stdint.h.
* include/stdint.h: New file with POSIX types.
* include/sys/types.h: Include stdint.h.
* ipc/ipc_kmsg.c: Use uint64_t.
* kern/exception.c: Use uint32_t.
* linux/dev/include/linux/types.h: Remove POSIX types.
* xen/block.c: Use uint64_t.
* xen/net.c: Do not use removed unsigned*_t types.
* xen/ring.h: Use uint32_t instead.
* xen/store.c: Use uint32_t.
* xen/store.h: Use uint32_t.
* xen/time.c: Use POSIX types only.
* xen/time.h: Use uint64_t.
Diffstat (limited to 'include/stdint.h')
-rw-r--r-- | include/stdint.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/include/stdint.h b/include/stdint.h new file mode 100644 index 00000000..bea277ec --- /dev/null +++ b/include/stdint.h @@ -0,0 +1,55 @@ +/* + * 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 _STDINT_H_ +#define _STDINT_H_ + +/* + * 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__ */ + +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__ */ + +/* 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__ */ + +#endif /* _STDINT_H_ */ |