Date: Fri, 08 May 2026 11:55:27 +0000 From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 57efbb1094e4 - stable/13 - Define stdint.h macros unconditionally Message-ID: <69fdcf2f.39a4e.7fa6298a@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=57efbb1094e4f90c6e150de60cf4dc20cd44d6d8 commit 57efbb1094e4f90c6e150de60cf4dc20cd44d6d8 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2026-05-01 18:07:11 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2026-05-08 10:28:09 +0000 Define stdint.h macros unconditionally Similar to glibc, define all the stdint.h macros such as `SIZE_MAX`, `UINT64_C`, etc unconditionally. I.e. no longer check whether `__STDC_CONSTANT_MACROS` or `__STDC_LIMIT_MACROS` are defined. See also <https://sourceware.org/bugzilla/show_bug.cgi?id=15366>. This is part of reverting base 00bee6fcd77f, which reverted an upstream libc++ commit that eliminated libc++'s stdint.h wrapper header. Submitted by: Nikolas Klauser <nikolasklauser@berlin.de> MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D56746 (cherry picked from commit 966fb94cb3575ccd39da211165d0858fd0eb0ef2) --- sys/arm/include/_stdint.h | 8 -------- sys/arm64/include/_stdint.h | 8 -------- sys/powerpc/include/_stdint.h | 8 -------- sys/riscv/include/_stdint.h | 8 -------- sys/x86/include/_stdint.h | 8 -------- 5 files changed, 40 deletions(-) diff --git a/sys/arm/include/_stdint.h b/sys/arm/include/_stdint.h index 9931f8b56ef5..b7dee286fb8c 100644 --- a/sys/arm/include/_stdint.h +++ b/sys/arm/include/_stdint.h @@ -33,8 +33,6 @@ #ifndef _MACHINE__STDINT_H_ #define _MACHINE__STDINT_H_ -#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) - #define INT8_C(c) (c) #define INT16_C(c) (c) #define INT32_C(c) (c) @@ -48,10 +46,6 @@ #define INTMAX_C(c) INT64_C(c) #define UINTMAX_C(c) UINT64_C(c) -#endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */ - -#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) - /* * ISO/IEC 9899:1999 * 7.18.2.1 Limits of exact-width integer types @@ -153,6 +147,4 @@ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX -#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */ - #endif /* !_MACHINE__STDINT_H_ */ diff --git a/sys/arm64/include/_stdint.h b/sys/arm64/include/_stdint.h index 914d1bb41b5b..8c98e4300036 100644 --- a/sys/arm64/include/_stdint.h +++ b/sys/arm64/include/_stdint.h @@ -31,8 +31,6 @@ #ifndef _MACHINE__STDINT_H_ #define _MACHINE__STDINT_H_ -#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) - #define INT8_C(c) (c) #define INT16_C(c) (c) #define INT32_C(c) (c) @@ -46,10 +44,6 @@ #define INTMAX_C(c) INT64_C(c) #define UINTMAX_C(c) UINT64_C(c) -#endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */ - -#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) - /* * ISO/IEC 9899:1999 * 7.18.2.1 Limits of exact-width integer types @@ -151,6 +145,4 @@ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX -#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */ - #endif /* !_MACHINE__STDINT_H_ */ diff --git a/sys/powerpc/include/_stdint.h b/sys/powerpc/include/_stdint.h index 7fbb0118643f..9619b731d695 100644 --- a/sys/powerpc/include/_stdint.h +++ b/sys/powerpc/include/_stdint.h @@ -40,8 +40,6 @@ #ifndef _MACHINE__STDINT_H_ #define _MACHINE__STDINT_H_ -#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) - #define INT8_C(c) (c) #define INT16_C(c) (c) #define INT32_C(c) (c) @@ -61,10 +59,6 @@ #define INTMAX_C(c) INT64_C(c) #define UINTMAX_C(c) UINT64_C(c) -#endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */ - -#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) - #ifndef __INT64_C #ifdef __LP64__ #define __INT64_C(c) (c ## L) @@ -195,6 +189,4 @@ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX -#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */ - #endif /* !_MACHINE__STDINT_H_ */ diff --git a/sys/riscv/include/_stdint.h b/sys/riscv/include/_stdint.h index b2276940e9e4..ec6a5bc5902a 100644 --- a/sys/riscv/include/_stdint.h +++ b/sys/riscv/include/_stdint.h @@ -31,8 +31,6 @@ #ifndef _MACHINE__STDINT_H_ #define _MACHINE__STDINT_H_ -#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) - #define INT8_C(c) (c) #define INT16_C(c) (c) #define INT32_C(c) (c) @@ -46,10 +44,6 @@ #define INTMAX_C(c) INT64_C(c) #define UINTMAX_C(c) UINT64_C(c) -#endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */ - -#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) - /* * ISO/IEC 9899:1999 * 7.18.2.1 Limits of exact-width integer types @@ -151,6 +145,4 @@ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX -#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */ - #endif /* !_MACHINE__STDINT_H_ */ diff --git a/sys/x86/include/_stdint.h b/sys/x86/include/_stdint.h index e7fb926e4b1c..e49a111bf0cc 100644 --- a/sys/x86/include/_stdint.h +++ b/sys/x86/include/_stdint.h @@ -42,8 +42,6 @@ #include <machine/_limits.h> -#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) - #define INT8_C(c) (c) #define INT16_C(c) (c) #define INT32_C(c) (c) @@ -63,10 +61,6 @@ #define INTMAX_C(c) INT64_C(c) #define UINTMAX_C(c) UINT64_C(c) -#endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */ - -#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) - /* * ISO/IEC 9899:1999 * 7.18.2.1 Limits of exact-width integer types @@ -186,6 +180,4 @@ #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX -#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */ - #endif /* !_MACHINE__STDINT_H_ */home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69fdcf2f.39a4e.7fa6298a>
