sys/user.h: derive __WORDSIZE from __LONG_MAX
previously, only a few archs defined it here. this change makes the presence consistent across all archs, and reduces the amount of header duplication (and potential for future inconsistency) between archs.
This commit is contained in:
1 parent
e709a6f07a
commit
7019fbe103
5 files changed
+9
-12
No files matched your search
@@ -8,6 +8,15 @@ extern "C" {
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <bits/alltype.h>
|
||||
|
||||
#undef __WORDSIZE
|
||||
#if __LONG_MAX == 0x7fffffffL
|
||||
#define __WORDSIZE 32
|
||||
#else
|
||||
#define __WORDSIZE 64
|
||||
#endif
|
||||
|
||||
#include <bits/user.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in new issue
Block a user