aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/sys/stdint.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/sys/stdint.h b/sys/sys/stdint.h
index d5d92a5f4611..aa5ac81d1017 100644
--- a/sys/sys/stdint.h
+++ b/sys/sys/stdint.h
@@ -64,4 +64,11 @@ typedef __uintmax_t uintmax_t;
#define _UINTMAX_T_DECLARED
#endif
+/* GNU and Darwin define this and people seem to think it's portable */
+#if defined(UINTPTR_MAX) && defined(UINT64_MAX) && (UINTPTR_MAX == UINT64_MAX)
+#define __WORDSIZE 64
+#else
+#define __WORDSIZE 32
+#endif
+
#endif /* !_SYS_STDINT_H_ */