aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2024-05-07 09:07:41 -0400
committerRich Felker <dalias@aerifal.cx>2024-05-07 09:08:31 -0400
commite709a6f07ade208ba513f9225222336f30c304b0 (patch)
tree3932e3b0bd3a03e3a8e367bc5dde8d51ded9dcd6 /include
parent29b216b2f22d3341c4c00608d7ad554a6aed26f7 (diff)
downloadmusl-e709a6f07ade208ba513f9225222336f30c304b0.tar.gz
musl-e709a6f07ade208ba513f9225222336f30c304b0.zip
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.
Diffstat (limited to 'include')
-rw-r--r--include/sys/reg.h9
1 files changed, 9 insertions, 0 deletions
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 <limits.h>
#include <unistd.h>
+#include <bits/alltype.h>
+
+#undef __WORDSIZE
+#if __LONG_MAX == 0x7fffffffL
+#define __WORDSIZE 32
+#else
+#define __WORDSIZE 64
+#endif
+
#include <bits/reg.h>
#endif