aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorPaul Eggert2014-04-13 15:51:08 -0700
committerPaul Eggert2014-04-13 15:51:08 -0700
commit13a5993b31ad0fb483272d8269d249d78ed01dd5 (patch)
tree09985c653ccb64c8ea90c0da0740b329fa10f966 /src/alloc.c
parentced78c5a65b64b0e520b03cd3a987374ea4ca7d2 (diff)
downloademacs-13a5993b31ad0fb483272d8269d249d78ed01dd5.tar.gz
emacs-13a5993b31ad0fb483272d8269d249d78ed01dd5.zip
Port to IRIX 6.5.
This port requires IRIX cc, as I did not have time to get undump working with the old GCC on the system I had access to, but that's better than nothing. * configure.ac (gl_GCC_VERSION_IFELSE): Remove unused macro that wouldn't have worked anyway, with IRIX cc. (emacs_cv_clang, emacs_cv_sanitize_address) (ns_osx_have_104, ns_osx_have_105): Don't assume '#error' makes the compiler fail, as this doesn't work with IRIX cc. (CFLAGS, LIBS): Don't let the GnuTLS results infect later 'configure' checks. This runs afoul of an IRIX configuration where GnuTLS is in an optional library that also contains getdelim, and causes a later 'configure' to incorrectly think getdelim is supported. * src/alloc.c (TAGGABLE_NULL): New constant, for porting to hosts with nontrivial DATA_SEG_BITS settings. (next_vector, set_next_vector): Use it. * src/conf_post.h (INET6) [IRIX6_5]: Define. (HAVE_GETADDRINFO) [IRIX6_5]: Undef. * src/data.c (BITS_PER_ULL): Don't assume ULLONG_MAX is defined. * src/lisp.h (lisp_h_XPNTR): Don't OR in bits that aren't masked out, for consistency with how TAGGABLE_NULL is computed. Fixes: debbugs:9684
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c10
1 files changed, 8 insertions, 2 deletions
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,
2647 ***********************************************************************/ 2647 ***********************************************************************/
2648 2648
2649/* Sometimes a vector's contents are merely a pointer internally used 2649/* Sometimes a vector's contents are merely a pointer internally used
2650 in vector allocation code. Usually you don't want to touch this. */ 2650 in vector allocation code. On the rare platforms where a null
2651 pointer cannot be tagged, represent it with a Lisp 0.
2652 Usually you don't want to touch this. */
2653
2654enum { TAGGABLE_NULL = (DATA_SEG_BITS & ~VALMASK) == 0 };
2651 2655
2652static struct Lisp_Vector * 2656static struct Lisp_Vector *
2653next_vector (struct Lisp_Vector *v) 2657next_vector (struct Lisp_Vector *v)
2654{ 2658{
2659 if (! TAGGABLE_NULL && EQ (v->contents[0], make_number (0)))
2660 return 0;
2655 return XUNTAG (v->contents[0], 0); 2661 return XUNTAG (v->contents[0], 0);
2656} 2662}
2657 2663
2658static void 2664static void
2659set_next_vector (struct Lisp_Vector *v, struct Lisp_Vector *p) 2665set_next_vector (struct Lisp_Vector *v, struct Lisp_Vector *p)
2660{ 2666{
2661 v->contents[0] = make_lisp_ptr (p, 0); 2667 v->contents[0] = TAGGABLE_NULL || p ? make_lisp_ptr (p, 0) : make_number (0);
2662} 2668}
2663 2669
2664/* This value is balanced well enough to avoid too much internal overhead 2670/* This value is balanced well enough to avoid too much internal overhead