diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index 5170a27768b..628d3837f01 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 1, 2025 +.Dd November 27, 2025 .Dt ARCH 7 .Os .Sh NAME @@ -48,7 +48,8 @@ and later, unless otherwise noted. .Fx uses a flat address space. Variables of types -.Vt unsigned long +.Vt unsigned long , +.Vt ptraddr_t , and .Vt size_t have the same representation. diff --git a/sys/sys/_types.h b/sys/sys/_types.h index 6b70b8dc6e3..6e69b06f689 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -103,6 +103,12 @@ typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */ #error unsupported ptrdiff_t size #endif +#ifdef __PTRADDR_TYPE__ +typedef __PTRADDR_TYPE__ __ptraddr_t; +#else +typedef __size_t __ptraddr_t; +#endif + /* * Target-dependent type definitions. */ diff --git a/sys/sys/stddef.h b/sys/sys/stddef.h index 73636f5a237..90186eed762 100644 --- a/sys/sys/stddef.h +++ b/sys/sys/stddef.h @@ -32,6 +32,14 @@ #include #include #include +#include + +#if __BSD_VISIBLE +#ifndef _PTRADDR_T_DECLARED +typedef __ptraddr_t ptraddr_t; +#define _PTRADDR_T_DECLARED +#endif +#endif #ifndef _PTRDIFF_T_DECLARED typedef __ptrdiff_t ptrdiff_t;