git: 3d2837f3bd04 - main - arm64: Fix sig_atomic_t limit definitions

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Wed, 22 Mar 2023 16:24:35 UTC
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/src/commit/?id=3d2837f3bd044d879d652e64ced79cd890e690c5

commit 3d2837f3bd044d879d652e64ced79cd890e690c5
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2023-03-22 16:22:21 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2023-03-22 16:22:21 +0000

    arm64: Fix sig_atomic_t limit definitions
    
    sig_atomic_t is defined as a long and thus is 64-bit on arm64.  For some
    reason its limit was incorrectly specified as a 32-bit number.  This had
    the unfortunate side effect of causing gnulib to override most of the
    definitions in stdint.h.  On CheriBSD this breaks all software that uses
    gnulib in annoying and hard to debug ways.
    
    Technically updating the limits might be an ABI change, but these
    defines are largely unused (the only use in tree is in the libc++ test
    suite where it's use an assertion that will fail due to this bug).
    Further, since the underlying type remains the same, we're just
    increasing the range of values a paranoid program might use.
    
    Reviewed by:    andrew, emaste
    Sponsored by:   DARPA
    Differential Revision:  https://reviews.freebsd.org/D39193
---
 sys/arm64/include/_stdint.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/arm64/include/_stdint.h b/sys/arm64/include/_stdint.h
index 32e5b6fd081e..d73a9c088b59 100644
--- a/sys/arm64/include/_stdint.h
+++ b/sys/arm64/include/_stdint.h
@@ -143,8 +143,8 @@
 #define	PTRDIFF_MAX	INT64_MAX
 
 /* Limits of sig_atomic_t. */
-#define	SIG_ATOMIC_MIN	INT32_MIN
-#define	SIG_ATOMIC_MAX	INT32_MAX
+#define	SIG_ATOMIC_MIN	INT64_MIN
+#define	SIG_ATOMIC_MAX	INT64_MAX
 
 /* Limit of size_t. */
 #define	SIZE_MAX	UINT64_MAX