summaryrefslogtreecommitdiff
path: root/libc/sysdeps/x86/bits/wordsize.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/x86/bits/wordsize.h')
-rw-r--r--libc/sysdeps/x86/bits/wordsize.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libc/sysdeps/x86/bits/wordsize.h b/libc/sysdeps/x86/bits/wordsize.h
new file mode 100644
index 000000000..e25af287e
--- /dev/null
+++ b/libc/sysdeps/x86/bits/wordsize.h
@@ -0,0 +1,13 @@
+/* Determine the wordsize from the preprocessor defines. */
+
+#if defined __x86_64__ && !defined __ILP32__
+# define __WORDSIZE 64
+#else
+# define __WORDSIZE 32
+#endif
+
+#ifdef __x86_64__
+# define __WORDSIZE_TIME64_COMPAT32 1
+/* Both x86-64 and x32 use the 64-bit system call interface. */
+# define __SYSCALL_WORDSIZE 64
+#endif