From 2ff02bff0995374ad20fcd59e00c095f8cf1c344 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Thu, 15 Dec 2011 11:21:56 +0000 Subject: [PATCH] Add a pointless and superfluous GNUism that people at a certain large data aggregation and advertising company seem to believe is standard. Approved by: dim (mentor) --- sys/sys/stdint.h | 7 +++++++ 1 file changed, 7 insertions(+) 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_ */