diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 12 | ||||
-rw-r--r-- | src/alloc.c | 10 | ||||
-rw-r--r-- | src/conf_post.h | 3 | ||||
-rw-r--r-- | src/data.c | 2 | ||||
-rw-r--r-- | src/lisp.h | 2 |
5 files changed, 24 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d885863d73c..be4ce13129c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2014-04-13 Paul Eggert <eggert@cs.ucla.edu> + + Port to IRIX 6.5 (Bug#9684). + * alloc.c (TAGGABLE_NULL): New constant, + for porting to hosts with nontrivial DATA_SEG_BITS settings. + (next_vector, set_next_vector): Use it. + * conf_post.h (INET6) [IRIX6_5]: Define. + (HAVE_GETADDRINFO) [IRIX6_5]: Undef. + * data.c (BITS_PER_ULL): Don't assume ULLONG_MAX is defined. + * lisp.h (lisp_h_XPNTR): Don't OR in bits that aren't masked out, + for consistency with how TAGGABLE_NULL is computed. + 2014-04-13 Eli Zaretskii <eliz@gnu.org> * keyboard.c (Fopen_dribble_file): Encode the dribble file-name diff --git a/src/alloc.c b/src/alloc.c index d4e24b6244b..ccb955a547b 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -2647,18 +2647,24 @@ DEFUN ("make-list", Fmake_list, Smake_list, 2, 2, 0, ***********************************************************************/ /* Sometimes a vector's contents are merely a pointer internally used - in vector allocation code. Usually you don't want to touch this. */ + in vector allocation code. On the rare platforms where a null + pointer cannot be tagged, represent it with a Lisp 0. + Usually you don't want to touch this. */ + +enum { TAGGABLE_NULL = (DATA_SEG_BITS & ~VALMASK) == 0 }; static struct Lisp_Vector * next_vector (struct Lisp_Vector *v) { + if (! TAGGABLE_NULL && EQ (v->contents[0], make_number (0))) + return 0; return XUNTAG (v->contents[0], 0); } static void set_next_vector (struct Lisp_Vector *v, struct Lisp_Vector *p) { - v->contents[0] = make_lisp_ptr (p, 0); + v->contents[0] = TAGGABLE_NULL || p ? make_lisp_ptr (p, 0) : make_number (0); } /* This value is balanced well enough to avoid too much internal overhead diff --git a/src/conf_post.h b/src/conf_post.h index 80d561090ed..bb3be1bb1ea 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -99,7 +99,8 @@ typedef bool bool_bf; #ifdef emacs char *_getpty(); #endif - +#define INET6 /* Needed for struct sockaddr_in6. */ +#undef HAVE_GETADDRINFO /* IRIX has getaddrinfo but not struct addrinfo. */ #endif /* IRIX6_5 */ #ifdef MSDOS diff --git a/src/data.c b/src/data.c index 4ef81f2474e..33dd619a0e1 100644 --- a/src/data.c +++ b/src/data.c @@ -2982,7 +2982,7 @@ bool_vector_spare_mask (EMACS_INT nr_bits) /* Info about unsigned long long, falling back on unsigned long if unsigned long long is not available. */ -#if HAVE_UNSIGNED_LONG_LONG_INT +#if HAVE_UNSIGNED_LONG_LONG_INT && defined ULLONG_MAX enum { BITS_PER_ULL = CHAR_BIT * sizeof (unsigned long long) }; # define ULL_MAX ULLONG_MAX #else diff --git a/src/lisp.h b/src/lisp.h index ea294f8d1da..6232c326c9a 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -344,7 +344,7 @@ enum enum_USE_LSB_TAG { USE_LSB_TAG = false }; (eassert (CONSP (a)), (struct Lisp_Cons *) XUNTAG (a, Lisp_Cons)) #define lisp_h_XHASH(a) XUINT (a) #define lisp_h_XPNTR(a) \ - ((void *) (intptr_t) ((XLI (a) & VALMASK) | DATA_SEG_BITS)) + ((void *) (intptr_t) ((XLI (a) & VALMASK) | (DATA_SEG_BITS & ~VALMASK))) #define lisp_h_XSYMBOL(a) \ (eassert (SYMBOLP (a)), (struct Lisp_Symbol *) XUNTAG (a, Lisp_Symbol)) #ifndef GC_CHECK_CONS_LIST |