Changeset 810a36f in mainline for abi/include/_bits
- Timestamp:
- 2017-10-24T05:29:08Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b1eb7ef
- Parents:
- c8fbbe7 (diff), 673ea28 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- abi/include/_bits
- Files:
-
- 7 added
- 8 moved
-
NULL.h (moved) (moved from uspace/lib/c/arch/amd64/include/libarch/stdint.h ) (2 diffs)
-
WCHAR_MAX.h (added)
-
WCHAR_MIN.h (added)
-
WEOF.h (moved) (moved from uspace/lib/c/arch/amd64/include/libarch/stddef.h ) (3 diffs)
-
all.h (moved) (moved from uspace/lib/c/arch/amd64/include/libarch/types.h ) (3 diffs)
-
inttypes.h (added)
-
limits.h (moved) (moved from uspace/lib/c/arch/arm32/include/libarch/stdint.h ) (3 diffs)
-
macros.h (added)
-
native.h (moved) (moved from uspace/lib/c/arch/abs32le/include/libarch/stdint.h ) (2 diffs)
-
ptrdiff_t.h (added)
-
size_t.h (moved) (moved from uspace/lib/c/arch/abs32le/include/libarch/stddef.h ) (3 diffs)
-
ssize_t.h (added)
-
stdint.h (added)
-
wchar_t.h (moved) (moved from uspace/lib/c/arch/arm32/include/libarch/stddef.h ) (3 diffs)
-
wint_t.h (moved) (moved from uspace/lib/c/arch/ia32/include/libarch/stddef.h ) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
abi/include/_bits/NULL.h
rc8fbbe7 r810a36f 1 1 /* 2 * Copyright (c) 20 06 Ondrej Palkovsky2 * Copyright (c) 2017 CZ.NIC, z.s.p.o. 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libcamd64 29 /* Authors: 30 * Jiří Zárevúcky (jzr) <zarevucky.jiri@gmail.com> 31 */ 32 33 /** @addtogroup bits 30 34 * @{ 31 35 */ 32 36 /** @file 37 * Definition of constant NULL. 38 * 39 * This definition is designed to work in both C and C++, and use 40 * the special constant `nullptr` in C++11 and above. 41 * Including this file is preferrable to defining the constant separately. 33 42 */ 34 43 35 #ifndef LIBC_amd64_STDINT_H_36 #define LIBC_amd64_STDINT_H_44 #ifndef _BITS_NULL_H_ 45 #define _BITS_NULL_H_ 37 46 38 #i nclude <libarch/common.h>47 #ifndef NULL 39 48 40 #define SIZE_MIN UINT64_MIN 41 #define SIZE_MAX UINT64_MAX 49 #if __cplusplus >= 201103L 50 #define NULL nullptr 51 #elif defined(__cplusplus) 52 #define NULL 0L 53 #else 54 #define NULL ((void *) 0) 55 #endif 42 56 43 #define UINTPTR_MAX UINT64_MAX 44 typedef uint64_t uintptr_t; 45 46 #define INTPTR_MIN INT64_MIN 47 #define INTPTR_MAX INT64_MAX 48 typedef int64_t intptr_t; 49 50 #define UINTMAX_MAX UINT64_MAX 51 typedef uint64_t uintmax_t; 52 53 #define INTMAX_MAX INT64_MAX 54 typedef int64_t intmax_t; 57 #endif 55 58 56 59 #endif -
abi/include/_bits/WEOF.h
rc8fbbe7 r810a36f 1 1 /* 2 * Copyright (c) 20 06 Ondrej Palkovsky2 * Copyright (c) 2017 CZ.NIC, z.s.p.o. 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libcamd64 29 /* Authors: 30 * Jiří Zárevúcky (jzr) <zarevucky.jiri@gmail.com> 31 */ 32 33 /** @addtogroup bits 30 34 * @{ 31 35 */ … … 33 37 */ 34 38 35 #ifndef LIBC_amd64_STDDEF_H_36 #define LIBC_amd64_STDDEF_H_39 #ifndef _BITS_WEOF_H_ 40 #define _BITS_WEOF_H_ 37 41 38 #include < libarch/common.h>42 #include <_bits/macros.h> 39 43 40 typedef uint64_t size_t; 41 typedef int64_t ssize_t; 42 typedef int64_t ptrdiff_t; 44 #define WEOF __WINT_EOF__ 43 45 44 46 #endif -
abi/include/_bits/all.h
rc8fbbe7 r810a36f 1 1 /* 2 * Copyright (c) 20 06 Ondrej Palkovsky2 * Copyright (c) 2017 CZ.NIC, z.s.p.o. 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libcamd64 29 /* Authors: 30 * Jiří Zárevúcky (jzr) <zarevucky.jiri@gmail.com> 31 */ 32 33 /** @addtogroup bits 30 34 * @{ 31 35 */ … … 33 37 */ 34 38 35 #ifndef LIBC_amd64_TYPES_H_36 #define LIBC_amd64_TYPES_H_39 #ifndef _BITS_ALL_H_ 40 #define _BITS_ALL_H_ 37 41 38 #include <libarch/common.h> 39 #include <libarch/stddef.h> 40 #include <libarch/stdint.h> 41 42 #define __64_BITS__ 43 44 #define SSIZE_MIN INT64_MIN 45 #define SSIZE_MAX INT64_MAX 46 47 typedef uint64_t sysarg_t; 48 typedef int64_t native_t; 49 50 typedef uint64_t atomic_count_t; 51 typedef int64_t atomic_signed_t; 42 #include <_bits/inttypes.h> 43 #include <_bits/limits.h> 44 #include <_bits/native.h> 45 #include <_bits/ptrdiff_t.h> 46 #include <_bits/size_t.h> 47 #include <_bits/ssize_t.h> 48 #include <_bits/stdint.h> 49 #include <_bits/wchar_t.h> 50 #include <_bits/wint_t.h> 52 51 53 52 #endif -
abi/include/_bits/limits.h
rc8fbbe7 r810a36f 1 1 /* 2 * Copyright (c) 20 06 Ondrej Palkovsky2 * Copyright (c) 2017 CZ.NIC, z.s.p.o. 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libcarm32 29 /* Authors: 30 * Jiří Zárevúcky (jzr) <zarevucky.jiri@gmail.com> 31 */ 32 33 /** @addtogroup bits 30 34 * @{ 31 35 */ … … 33 37 */ 34 38 35 #ifndef LIBC_arm32_STDINT_H_36 #define LIBC_arm32_STDINT_H_39 #ifndef _BITS_LIMITS_H_ 40 #define _BITS_LIMITS_H_ 37 41 38 #include < libarch/common.h>42 #include <_bits/macros.h> 39 43 40 #define SIZE_MIN UINT32_MIN 41 #define SIZE_MAX UINT32_MAX 44 /* _MIN macros for unsigned types are non-standard (and of course, always 0), 45 * but we already have them for some reason, so whatever. 46 */ 42 47 43 #define UINTPTR_MAX UINT32_MAX 44 typedef uint32_t uintptr_t; 48 #define CHAR_BIT __CHAR_BIT__ 45 49 46 #define INTPTR_MIN INT32_MIN 47 #define INTPTR_MAX INT32_MAX 48 typedef int32_t intptr_t; 50 #define SCHAR_MIN __SCHAR_MIN__ 51 #define SCHAR_MAX __SCHAR_MAX__ 49 52 50 #define U INTMAX_MAX UINT64_MAX51 typedef uint64_t uintmax_t; 53 #define UCHAR_MIN 0 54 #define UCHAR_MAX __UCHAR_MAX__ 52 55 53 #define INTMAX_MAX INT64_MAX 54 typedef int64_t intmax_t; 56 #define CHAR_MIN __CHAR_MIN__ 57 #define CHAR_MAX __CHAR_MAX__ 58 59 #define MB_LEN_MAX 16 60 61 #define SHRT_MIN __SHRT_MIN__ 62 #define SHRT_MAX __SHRT_MAX__ 63 64 #define USHRT_MIN 0 65 #define USHRT_MAX __USHRT_MAX__ 66 67 #define INT_MIN __INT_MIN__ 68 #define INT_MAX __INT_MAX__ 69 70 #define UINT_MIN 0U 71 #define UINT_MAX __UINT_MAX__ 72 73 #define LONG_MIN __LONG_MIN__ 74 #define LONG_MAX __LONG_MAX__ 75 76 #define ULONG_MIN 0UL 77 #define ULONG_MAX __ULONG_MAX__ 78 79 #define LLONG_MIN __LLONG_MIN__ 80 #define LLONG_MAX __LLONG_MAX__ 81 82 #define ULLONG_MIN 0ULL 83 #define ULLONG_MAX __ULLONG_MAX__ 55 84 56 85 #endif -
abi/include/_bits/native.h
rc8fbbe7 r810a36f 1 1 /* 2 * Copyright (c) 20 06 Ondrej Palkovsky2 * Copyright (c) 2017 CZ.NIC, z.s.p.o. 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libcabs32 29 /* Authors: 30 * Jiří Zárevúcky (jzr) <zarevucky.jiri@gmail.com> 31 */ 32 33 /** @addtogroup bits 30 34 * @{ 31 35 */ 32 36 /** @file 37 * A bunch of type aliases HelenOS code uses. 38 * 39 * They were originally defined as either u/int32_t or u/int64_t, 40 * specifically for each architecture, but in practice they are 41 * currently assumed to be identical to u/intptr_t, so we do just that. 33 42 */ 34 43 35 #ifndef LIBC_abs32_STDINT_H_36 #define LIBC_abs32_STDINT_H_44 #ifndef _BITS_NATIVE_H_ 45 #define _BITS_NATIVE_H_ 37 46 38 #include < libarch/common.h>47 #include <_bits/macros.h> 39 48 40 #define SIZE_MAX UINT32_MAX 49 #define ATOMIC_COUNT_MIN __UINTPTR_MIN__ 50 #define ATOMIC_COUNT_MAX __UINTPTR_MAX__ 41 51 42 #define UINTPTR_MAX UINT32_MAX 43 typedef uint32_t uintptr_t; 52 typedef __UINTPTR_TYPE__ pfn_t; 53 typedef __UINTPTR_TYPE__ ipl_t; 54 typedef __UINTPTR_TYPE__ sysarg_t; 55 typedef __INTPTR_TYPE__ native_t; 56 typedef __UINTPTR_TYPE__ atomic_count_t; 57 typedef __INTPTR_TYPE__ atomic_signed_t; 44 58 45 #define INTPTR_MIN INT32_MIN 46 #define INTPTR_MAX INT32_MAX 47 typedef int32_t intptr_t; 48 49 #define UINTMAX_MAX UINT64_MAX 50 typedef uint64_t uintmax_t; 51 52 #define INTMAX_MAX INT64_MAX 53 typedef int64_t intmax_t; 59 #define PRIdn __PRIdPTR__ /**< Format for native_t. */ 60 #define PRIun __PRIuPTR__ /**< Format for sysarg_t. */ 61 #define PRIxn __PRIxPTR__ /**< Format for hexadecimal sysarg_t. */ 62 #define PRIua __PRIuPTR__ /**< Format for atomic_count_t. */ 54 63 55 64 #endif -
abi/include/_bits/size_t.h
rc8fbbe7 r810a36f 1 1 /* 2 * Copyright (c) 20 06 Ondrej Palkovsky2 * Copyright (c) 2017 CZ.NIC, z.s.p.o. 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libcabs32 29 /* Authors: 30 * Jiří Zárevúcky (jzr) <zarevucky.jiri@gmail.com> 31 */ 32 33 /** @addtogroup bits 30 34 * @{ 31 35 */ … … 33 37 */ 34 38 35 #ifndef LIBC_abs32_STDDEF_H_36 #define LIBC_abs32_STDDEF_H_39 #ifndef _BITS_SIZE_T_H_ 40 #define _BITS_SIZE_T_H_ 37 41 38 #include < libarch/common.h>42 #include <_bits/macros.h> 39 43 40 typedef uint32_t size_t; 41 typedef int32_t ssize_t; 42 typedef int32_t ptrdiff_t; 44 typedef __SIZE_TYPE__ size_t; 43 45 44 46 #endif -
abi/include/_bits/wchar_t.h
rc8fbbe7 r810a36f 1 1 /* 2 * Copyright (c) 20 06 Ondrej Palkovsky2 * Copyright (c) 2017 CZ.NIC, z.s.p.o. 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libcarm32 29 /* Authors: 30 * Jiří Zárevúcky (jzr) <zarevucky.jiri@gmail.com> 31 */ 32 33 /** @addtogroup bits 30 34 * @{ 31 35 */ … … 33 37 */ 34 38 35 #ifndef LIBC_arm32_STDDEF_H_36 #define LIBC_arm32_STDDEF_H_39 #ifndef _BITS_WCHAR_T_H_ 40 #define _BITS_WCHAR_T_H_ 37 41 38 #include < libarch/common.h>42 #include <_bits/macros.h> 39 43 40 typedef uint32_t size_t; 41 typedef int32_t ssize_t; 42 typedef int32_t ptrdiff_t; 44 typedef __WCHAR_TYPE__ wchar_t; 43 45 44 46 #endif -
abi/include/_bits/wint_t.h
rc8fbbe7 r810a36f 1 1 /* 2 * Copyright (c) 20 06 Ondrej Palkovsky2 * Copyright (c) 2017 CZ.NIC, z.s.p.o. 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libcia32 29 /* Authors: 30 * Jiří Zárevúcky (jzr) <zarevucky.jiri@gmail.com> 31 */ 32 33 /** @addtogroup bits 30 34 * @{ 31 35 */ … … 33 37 */ 34 38 35 #ifndef LIBC_ia32_STDDEF_H_36 #define LIBC_ia32_STDDEF_H_39 #ifndef _BITS_WINT_T_H_ 40 #define _BITS_WINT_T_H_ 37 41 38 #include < libarch/common.h>42 #include <_bits/macros.h> 39 43 40 typedef uint32_t size_t; 41 typedef int32_t ssize_t; 42 typedef int32_t ptrdiff_t; 44 typedef __WINT_TYPE__ wint_t; 43 45 44 46 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
