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
This commit is contained in:
Paul Eggert 2014-04-13 15:51:08 -07:00
parent ced78c5a65
commit 13a5993b31
7 changed files with 45 additions and 30 deletions

View file

@ -1,3 +1,20 @@
2014-04-13 Paul Eggert <eggert@cs.ucla.edu>
Port to IRIX 6.5 (Bug#9684).
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.
2014-04-13 Eli Zaretskii <eliz@gnu.org>
* configure.ac (LN_S_FILEONLY, LN_S): Use "/bin/ln" on MinGW, to

View file

@ -779,30 +779,12 @@ if test "${enableval}" != "no"; then
fi
fi)
# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
# ------------------------------------------------
# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
# Otherwise, run RUN-IF-NOT-FOUND.
AC_DEFUN([gl_GCC_VERSION_IFELSE],
[AC_PREPROC_IFELSE(
[AC_LANG_PROGRAM(
[[
#if ($1) < __GNUC__ || (($1) == __GNUC__ && ($2) <= __GNUC_MINOR__)
/* ok */
#else
# error "your version of gcc is older than $1.$2"
#endif
]]),
], [$3], [$4])
]
)
# clang is unduly picky about some things.
AC_CACHE_CHECK([whether the compiler is clang], [emacs_cv_clang],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[
#ifndef __clang__
#error "not clang"
error "not clang";
#endif
]])],
[emacs_cv_clang=yes],
@ -1114,7 +1096,7 @@ AC_CACHE_CHECK([whether addresses are sanitized],
#endif
#if defined __SANITIZE_ADDRESS__ || __has_feature (address_sanitizer)
#else
#error "Addresses are not sanitized."
error "Addresses are not sanitized.";
#endif
]])],
[emacs_cv_sanitize_address=yes],
@ -1712,7 +1694,7 @@ fail;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
; /* OK */
#else
#error "OSX 10.4 or newer required"
error "OSX 10.4 or newer required";
#endif
#endif
])],
@ -1730,7 +1712,7 @@ fail;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
; /* OK */
#else
#error "OSX 10.5 not found"
error "OSX 10.5 not found";
#endif
#endif
])],
@ -2529,9 +2511,6 @@ if test "${with_gnutls}" = "yes" ; then
# Windows loads GnuTLS dynamically
if test "${opsys}" = "mingw32"; then
LIBGNUTLS_LIBS=
else
CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
LIBS="$LIBGNUTLS_LIBS $LIBS"
fi
fi

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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