diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-09-02 04:44:53 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-09-02 04:44:53 +0200 |
commit | bd5d2162efae9913f2666c80bdf944a65ea95590 (patch) | |
tree | 7cfda8110528b22a8377bf9fdf526b9e203beda9 /include | |
parent | remove old debug line (diff) | |
download | slibc-bd5d2162efae9913f2666c80bdf944a65ea95590.tar.gz slibc-bd5d2162efae9913f2666c80bdf944a65ea95590.tar.bz2 slibc-bd5d2162efae9913f2666c80bdf944a65ea95590.tar.xz |
fix more errors
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/bits/types.h | 8 | ||||
-rw-r--r-- | include/stdint.h | 44 | ||||
-rw-r--r-- | include/unistd.h | 6 |
3 files changed, 36 insertions, 22 deletions
diff --git a/include/bits/types.h b/include/bits/types.h index 7a2244e..41967f2 100644 --- a/include/bits/types.h +++ b/include/bits/types.h @@ -75,6 +75,8 @@ typedef unsigned long int uptrdiff_t; # define __DEFINED_wchar_t typedef long int wchar_t __warning("'wchar_t' is not guaranteed to be defined as expected, use 'int32_t'."); +# endif +# ifndef __WCHAR_MAX # define __WCHAR_MAX INTPTR_MAX # endif @@ -233,6 +235,8 @@ typedef unsigned __INT_FAST64 uint_fast64_t; #if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) # define __DEFINED_intmax_t typedef signed __INT64 intmax_t; +#endif +#ifndef __INTMAX_MAX # define __INTMAX_MAX INT64_MAX #endif @@ -243,6 +247,8 @@ typedef signed __INT64 intmax_t; #if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) # define __DEFINED_uintmax_t typedef unsigned __INT64 uintmax_t; +#endif +#ifndef __UINTMAX_MAX # define __UINTMAX_MAX UINT64_MAX #endif @@ -256,6 +262,8 @@ typedef unsigned __INT64 uintmax_t; #if defined(__NEED_sig_atomic_t) && !defined(__DEFINED_sig_atomic_t) # define __DEFINED_sig_atomic_t typedef int sig_atomic_t; +#endif +#ifndef __SIG_ATOMIC_BIT # define __SIG_ATOMIC_BIT __INT_BIT #endif diff --git a/include/stdint.h b/include/stdint.h index d9e0dcd..c814f13 100644 --- a/include/stdint.h +++ b/include/stdint.h @@ -60,49 +60,49 @@ * Macro that ensure that an unsigned numeral literal * of at most 16 encoding bits does not overflow. */ -#define UINT16_C(value) value # U +#define UINT16_C(value) value ## U /** * Macro that ensure that a signed numeral literal * of at most 32 encoding bits does not overflow. */ -#if __INT_BITS == 16 -# define INT32_C(value) value # L +#if __INT_BIT == 16 +# define INT32_C(value) value ## L #else # define INT32_C(value) value -#end +#endif /** * Macro that ensure that an unsigned numeral literal * of at most 32 encoding bits does not overflow. */ -#if __INT_BITS == 16 -# define UINT32_C(value) value # UL +#if __INT_BIT == 16 +# define UINT32_C(value) value ## UL #else -# define UINT32_C(value) value # U -#end +# define UINT32_C(value) value ## U +#endif /** * Macro that ensure that a signed numeral literal * of at most 64 encoding bits does not overflow. */ -#if __LONG_BITS == 32 -# define INT64_C(value) value # LL +#if __LONG_BIT == 32 +# define INT64_C(value) value ## LL #else -# define INT64_C(value) value # L -#end +# define INT64_C(value) value ## L +#endif /** * Macro that ensure that an unsigned numeral literal * of at most 64 encoding bits does not overflow. */ -#if __LONG_BITS == 32 -# define UINT64_C(value) value # ULL +#if __LONG_BIT == 32 +# define UINT64_C(value) value ## ULL #else -# define UINT64_C(value) value # UL -#end +# define UINT64_C(value) value ## UL +#endif /** @@ -110,10 +110,10 @@ * does not overflow, unless there is no scalar integer * type that can hold it. */ -#if __LONG_BITS == __LONG_LONG_BITS -# define INTMAX_C(value) value # L +#if __LONG_BIT == __LONG_LONG_BIT +# define INTMAX_C(value) value ## L #else -# define INTMAX_C(value) value # LL +# define INTMAX_C(value) value ## LL #endif /** @@ -121,10 +121,10 @@ * does not overflow, unless there is no scalar integer * type that can hold it. */ -#if __LONG_BITS == __LONG_LONG_BITS -# define UINTMAX_C(value) value # UL +#if __LONG_BIT == __LONG_LONG_BIT +# define UINTMAX_C(value) value ## UL #else -# define UINTMAX_C(value) value # ULL +# define UINTMAX_C(value) value ## ULL #endif diff --git a/include/unistd.h b/include/unistd.h index b2831f5..85c34d5 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -22,6 +22,12 @@ +#define __NEED_size_t +#define __NEED_ssize_t +#define __NEED_uid_t /* TODO not implement */ +#define __NEED_gid_t /* TODO not implement */ +#define __NEED_off_t /* TODO not implement */ +#define __NEED_pid_t /* TODO not implement */ #define __NEED_ptrdiff_t #include <bits/types.h> |