First commit in a series of changes for LLP64 platform support.
We have been using `(un)signed long' assuming that it is an integer
of the same size as a pointer. On Windows x64 this assumption does
not hold, and `(un)signed long long' is required for the same
purpose.
Code will be updated to use our own types uword_t, sword_t instead,
which are defined to be synonyms of uintptr_t and intptr_t, respectively.
Note that uword_t is also synonymous with our older type
pointer_sized_uint_t, and technically (albeit not conceptually) the
same as lispobj.
Thanks to Anton Kovalenko.
#define _GC_H_
#include "sbcl.h"
+#include <stdint.h>
#define PAGE_BYTES BACKEND_PAGE_BYTES
-typedef signed long page_index_t;
+typedef intptr_t page_index_t;
#define PAGE_INDEX_FMT "ld"
typedef signed char generation_index_t;
typedef signed int s32;
/* this is an integral type the same length as a machine pointer */
-typedef unsigned long pointer_sized_uint_t ;
+typedef uintptr_t pointer_sized_uint_t;
#include <sys/types.h>
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 unsigned long lispobj;
+typedef uintptr_t lispobj;
#else
#define OBJ_FMTX "x"
#define LOW_WORD(c) ((long)(c) & 0xFFFFFFFFL)
typedef void *siginfo_t;
#endif
-/* Note: This typedef will moved to runtime.h when AMD64 changes are being
- * merged. */
-typedef unsigned long uword_t;
-
typedef LPVOID os_vm_address_t;
typedef uword_t os_vm_size_t;
typedef intptr_t os_vm_offset_t;