From e709a6f07ade208ba513f9225222336f30c304b0 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 7 May 2024 09:07:41 -0400 Subject: sys/reg.h: derive __WORDSIZE from __LONG_MAX this removes an otherwise-unnecessary bits header from most archs, replacing it with an empty generic version. --- include/sys/reg.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/sys/reg.h') diff --git a/include/sys/reg.h b/include/sys/reg.h index b47452d0..4e6ce222 100644 --- a/include/sys/reg.h +++ b/include/sys/reg.h @@ -4,6 +4,15 @@ #include #include +#include + +#undef __WORDSIZE +#if __LONG_MAX == 0x7fffffffL +#define __WORDSIZE 32 +#else +#define __WORDSIZE 64 +#endif + #include #endif -- cgit 1.4.1