powerpc/_stdint.h: fix SIG_ATOMIC_{MIN,MAX,WIDTH}
On powerpc/powerpc64, sig_atomic_t is an int, but was treated as if it was a long by <machine/_stdint.h>. This was finally caught by the unit test added with4a1c752/ D53831. Reported by: kib Reviewed by: kib, imp Approved by: markj (mentor) Fixes:c3e289e1ceMFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54026
This commit is contained in:
@@ -167,15 +167,15 @@
|
||||
* ISO/IEC 9899:1999
|
||||
* 7.18.3 Limits of other integer types
|
||||
*/
|
||||
/* Limits of sig_atomic_t. */
|
||||
#define SIG_ATOMIC_MIN INT32_MIN
|
||||
#define SIG_ATOMIC_MAX INT32_MAX
|
||||
|
||||
#ifdef __LP64__
|
||||
/* Limits of ptrdiff_t. */
|
||||
#define PTRDIFF_MIN INT64_MIN
|
||||
#define PTRDIFF_MAX INT64_MAX
|
||||
|
||||
/* Limits of sig_atomic_t. */
|
||||
#define SIG_ATOMIC_MIN INT64_MIN
|
||||
#define SIG_ATOMIC_MAX INT64_MAX
|
||||
|
||||
/* Limit of size_t. */
|
||||
#define SIZE_MAX UINT64_MAX
|
||||
#else
|
||||
@@ -183,10 +183,6 @@
|
||||
#define PTRDIFF_MIN INT32_MIN
|
||||
#define PTRDIFF_MAX INT32_MAX
|
||||
|
||||
/* Limits of sig_atomic_t. */
|
||||
#define SIG_ATOMIC_MIN INT32_MIN
|
||||
#define SIG_ATOMIC_MAX INT32_MAX
|
||||
|
||||
/* Limit of size_t. */
|
||||
#define SIZE_MAX UINT32_MAX
|
||||
#endif
|
||||
@@ -217,13 +213,12 @@
|
||||
*/
|
||||
#ifdef __LP64__
|
||||
#define PTRDIFF_WIDTH INT64_WIDTH
|
||||
#define SIG_ATOMIC_WIDTH INT64_WIDTH
|
||||
#define SIZE_WIDTH INT64_WIDTH
|
||||
#else
|
||||
#define PTRDIFF_WIDTH INT32_WIDTH
|
||||
#define SIG_ATOMIC_WIDTH INT32_WIDTH
|
||||
#define SIZE_WIDTH INT32_WIDTH
|
||||
#endif
|
||||
#define SIG_ATOMIC_WIDTH INT32_WIDTH
|
||||
#define WCHAR_WIDTH INT32_WIDTH
|
||||
#define WINT_WIDTH INT32_WIDTH
|
||||
#endif /* __ISO_C_VISIBLE >= 2023 */
|
||||
|
||||
Reference in New Issue
Block a user