Merge "Fix ssize_t, WCHAR_MIN and WCHAR_MAX"
This commit is contained in:
@@ -251,7 +251,7 @@ typedef int64_t intmax_t;
|
|||||||
/* size_t is defined by the GCC-specific <stddef.h> */
|
/* size_t is defined by the GCC-specific <stddef.h> */
|
||||||
#ifndef _SSIZE_T_DEFINED_
|
#ifndef _SSIZE_T_DEFINED_
|
||||||
#define _SSIZE_T_DEFINED_
|
#define _SSIZE_T_DEFINED_
|
||||||
typedef long int ssize_t;
|
typedef int ssize_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _BITSIZE 32
|
#define _BITSIZE 32
|
||||||
|
|||||||
@@ -86,21 +86,14 @@
|
|||||||
# else
|
# else
|
||||||
/* Otherwise, the value is derived from the toolchain configuration.
|
/* Otherwise, the value is derived from the toolchain configuration.
|
||||||
* to avoid putting explicit CPU checks in this header. */
|
* to avoid putting explicit CPU checks in this header. */
|
||||||
# ifndef __WCHAR_MAX__
|
|
||||||
# error "__WCHAR_MAX__ is not defined. Check your toolchain!"
|
|
||||||
# endif
|
|
||||||
/* Clang does define __WCHAR_MAX__, but not __WCHAR_MIN__ */
|
|
||||||
# ifndef __WCHAR_MIN__
|
|
||||||
# if __WCHAR_MAX__ == 4294967295
|
|
||||||
# define __WCHAR_MIN__ (0U)
|
|
||||||
# elif __WCHAR_MAX__ == 2147483647
|
|
||||||
# define __WCHAR_MIN__ (-2147483647 - 1)
|
|
||||||
# else
|
|
||||||
# error "Invalid __WCHAR_MAX__ value. Check your toolchain!"
|
|
||||||
# endif
|
|
||||||
# endif /* !__WCHAR_MIN__ */
|
|
||||||
# define WCHAR_MIN __WCHAR_MIN__
|
|
||||||
# define WCHAR_MAX __WCHAR_MAX__
|
# define WCHAR_MAX __WCHAR_MAX__
|
||||||
|
|
||||||
|
/* Clang does not define __WCHAR_MIN__ */
|
||||||
|
# if defined(__WCHAR_UNSIGNED__)
|
||||||
|
# define WCHAR_MIN L'\0'
|
||||||
|
# else
|
||||||
|
# define WCHAR_MIN (-(WCHAR_MAX) - 1)
|
||||||
|
# endif
|
||||||
# endif /* !_WCHAR_IS_ALWAYS_SIGNED */
|
# endif /* !_WCHAR_IS_ALWAYS_SIGNED */
|
||||||
|
|
||||||
#endif /* !WCHAR_MIN */
|
#endif /* !WCHAR_MIN */
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ typedef .... pthread_t;
|
|||||||
|
|
||||||
#ifndef _SSIZE_T_DEFINED_
|
#ifndef _SSIZE_T_DEFINED_
|
||||||
#define _SSIZE_T_DEFINED_
|
#define _SSIZE_T_DEFINED_
|
||||||
typedef long int ssize_t;
|
typedef int ssize_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef __kernel_suseconds_t suseconds_t;
|
typedef __kernel_suseconds_t suseconds_t;
|
||||||
|
|||||||
Reference in New Issue
Block a user