+
+/* this is an integral type the same length as a machine pointer */
+typedef uintptr_t pointer_sized_uint_t;
+
+#ifdef _WIN64
+#define AMD64_SYSV_ABI __attribute__((sysv_abi))
+#else
+#define AMD64_SYSV_ABI
+#endif
+
+#include <sys/types.h>
+
+#if defined(LISP_FEATURE_SB_THREAD)
+typedef pthread_t os_thread_t;
+#else
+typedef pid_t os_thread_t;
+#endif
+
+typedef uintptr_t uword_t;
+typedef intptr_t sword_t;
+
+/* FIXME: we do things this way because of the alpha32 port. once
+ alpha64 has arrived, all this nastiness can go away */
+#if 64 == N_WORD_BITS
+#define LOW_WORD(c) ((pointer_sized_uint_t)c)
+#define OBJ_FMTX "lx"
+typedef uintptr_t lispobj;
+#else
+#define OBJ_FMTX "x"
+#define LOW_WORD(c) ((long)(c) & 0xFFFFFFFFL)
+/* fake it on alpha32 */
+typedef unsigned int lispobj;
+#endif
+
+static inline int
+lowtag_of(lispobj obj)
+{
+ return obj & LOWTAG_MASK;
+}
+
+static inline int
+widetag_of(lispobj obj)
+{
+ return obj & WIDETAG_MASK;
+}
+
+static inline uword_t
+HeaderValue(lispobj obj)
+{
+ return obj >> N_WIDETAG_BITS;
+}
+
+static inline struct cons *
+CONS(lispobj obj)
+{
+ return (struct cons *)(obj - LIST_POINTER_LOWTAG);
+}
+
+static inline struct symbol *
+SYMBOL(lispobj obj)
+{
+ return (struct symbol *)(obj - OTHER_POINTER_LOWTAG);
+}
+
+static inline struct fdefn *
+FDEFN(lispobj obj)
+{
+ return (struct fdefn *)(obj - OTHER_POINTER_LOWTAG);
+}
+
+/* Is the Lisp object obj something with pointer nature (as opposed to
+ * e.g. a fixnum or character or unbound marker)? */
+static inline int
+is_lisp_pointer(lispobj obj)
+{
+#if N_WORD_BITS == 64
+ return (obj & 3) == 3;
+#else
+ return obj & 1;