* commit '0b73dac8aa9546c0f532c7ea5e0bf72dd029f271': libc: <stdint.h>: Proper C++
This commit is contained in:
commit
b868a32df6
1 changed files with 26 additions and 12 deletions
|
@ -211,14 +211,20 @@ typedef uint64_t uint_fast64_t;
|
|||
typedef int intptr_t;
|
||||
typedef unsigned int uintptr_t;
|
||||
|
||||
#ifdef __STDINT_LIMITS
|
||||
# define INTPTR_MIN INT32_MIN
|
||||
# define INTPTR_MAX INT32_MAX
|
||||
# define UINTPTR_MAX UINT32_MAX
|
||||
# define PTRDIFF_MIN INT32_MIN
|
||||
# define PTRDIFF_MAX INT32_MAX
|
||||
#endif
|
||||
|
||||
#ifdef __STDINT_MACROS
|
||||
# define INTPTR_C(c) INT32_C(c)
|
||||
# define UINTPTR_C(c) UINT32_C(c)
|
||||
# define PTRDIFF_C(c) INT32_C(c)
|
||||
# define PTRDIFF_MIN INT32_MIN
|
||||
# define PTRDIFF_MAX INT32_MAX
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
@ -230,24 +236,32 @@ typedef unsigned int uintptr_t;
|
|||
typedef uint64_t uintmax_t;
|
||||
typedef int64_t intmax_t;
|
||||
|
||||
#ifdef __STDINT_LIMITS
|
||||
# define INTMAX_MIN INT64_MIN
|
||||
# define INTMAX_MAX INT64_MAX
|
||||
# define UINTMAX_MAX UINT64_MAX
|
||||
#endif
|
||||
|
||||
#ifndef __STDINT_MACROS
|
||||
# define INTMAX_C(c) INT64_C(c)
|
||||
# define UINTMAX_C(c) UINT64_C(c)
|
||||
#endif
|
||||
|
||||
#else /* !__STDC_INT64__ */
|
||||
|
||||
typedef uint32_t uintmax_t;
|
||||
typedef int32_t intmax_t;
|
||||
|
||||
#ifdef __STDINT_LIMITS
|
||||
# define INTMAX_MIN INT32_MIN
|
||||
# define INTMAX_MAX INT32_MAX
|
||||
# define UINTMAX_MAX UINT32_MAX
|
||||
#endif
|
||||
|
||||
#ifdef __STDINT_MACROS
|
||||
# define INTMAX_C(c) INT32_C(c)
|
||||
# define UINTMAX_C(c) UINT32_C(c)
|
||||
#endif
|
||||
|
||||
#endif /* !__STDC_INT64__ */
|
||||
|
||||
|
|
Loading…
Reference in a new issue