Simplify by removing HAVE_STRUCT_ATTRIBUTE_ALIGNED
* configure.ac (HAVE_STRUCT_ATTRIBUTE_ALIGNED): Remove. No longer needed, since we no longer rely on __attribute__ ((aligned (8))). All uses removed. * src/emacs-module.c (HAVE_STRUCT_ATTRIBUTE_ALIGNED): Remove. (lisp_to_value): Simplify now that we no longer need to worry whether HAVE_STRUCT_ATTRIBUTE_ALIGNED is false.
This commit is contained in:
parent
b1573a97e1
commit
d14956099d
3 changed files with 0 additions and 34 deletions
|
@ -103,7 +103,6 @@ HAVE_ALARM
|
||||||
HAVE_ALLOCA
|
HAVE_ALLOCA
|
||||||
HAVE_ALLOCA_H
|
HAVE_ALLOCA_H
|
||||||
HAVE_ALSA
|
HAVE_ALSA
|
||||||
HAVE_ATTRIBUTE_ALIGNED
|
|
||||||
HAVE_BDFFONT
|
HAVE_BDFFONT
|
||||||
HAVE_BOXES
|
HAVE_BOXES
|
||||||
HAVE_C99_STRTOLD
|
HAVE_C99_STRTOLD
|
||||||
|
|
16
configure.ac
16
configure.ac
|
@ -5113,22 +5113,6 @@ else
|
||||||
fi
|
fi
|
||||||
AC_SUBST(LIBXMENU)
|
AC_SUBST(LIBXMENU)
|
||||||
|
|
||||||
AC_CACHE_CHECK([for struct alignment],
|
|
||||||
[emacs_cv_struct_alignment],
|
|
||||||
[AC_COMPILE_IFELSE(
|
|
||||||
[AC_LANG_PROGRAM([[#include <stddef.h>
|
|
||||||
struct __attribute__ ((aligned (8))) s { char c; };
|
|
||||||
struct t { char c; struct s s; };
|
|
||||||
char verify[offsetof (struct t, s) == 8 ? 1 : -1];
|
|
||||||
]])],
|
|
||||||
[emacs_cv_struct_alignment=yes],
|
|
||||||
[emacs_cv_struct_alignment=no])])
|
|
||||||
if test "$emacs_cv_struct_alignment" = yes; then
|
|
||||||
AC_DEFINE([HAVE_STRUCT_ATTRIBUTE_ALIGNED], 1,
|
|
||||||
[Define to 1 if 'struct __attribute__ ((aligned (N)))' aligns the
|
|
||||||
structure to an N-byte boundary.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "${GNU_MALLOC}" = "yes" ; then
|
if test "${GNU_MALLOC}" = "yes" ; then
|
||||||
AC_DEFINE(GNU_MALLOC, 1,
|
AC_DEFINE(GNU_MALLOC, 1,
|
||||||
[Define to 1 if you want to use the GNU memory allocator.])
|
[Define to 1 if you want to use the GNU memory allocator.])
|
||||||
|
|
|
@ -998,10 +998,6 @@ lisp_to_value_bits (Lisp_Object o)
|
||||||
return (emacs_value) p;
|
return (emacs_value) p;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_STRUCT_ATTRIBUTE_ALIGNED
|
|
||||||
enum { HAVE_STRUCT_ATTRIBUTE_ALIGNED = 0 };
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Convert O to an emacs_value. Allocate storage if needed; this can
|
/* Convert O to an emacs_value. Allocate storage if needed; this can
|
||||||
signal if memory is exhausted. Must be an injective function. */
|
signal if memory is exhausted. Must be an injective function. */
|
||||||
static emacs_value
|
static emacs_value
|
||||||
|
@ -1029,19 +1025,6 @@ lisp_to_value (emacs_env *env, Lisp_Object o)
|
||||||
/* Package the incompressible object pointer inside a pair
|
/* Package the incompressible object pointer inside a pair
|
||||||
that is compressible. */
|
that is compressible. */
|
||||||
Lisp_Object pair = Fcons (o, ltv_mark);
|
Lisp_Object pair = Fcons (o, ltv_mark);
|
||||||
|
|
||||||
if (! HAVE_STRUCT_ATTRIBUTE_ALIGNED)
|
|
||||||
{
|
|
||||||
/* Keep calling Fcons until it returns a compressible pair.
|
|
||||||
This shouldn't take long. */
|
|
||||||
while ((intptr_t) XCONS (pair) & (GCALIGNMENT - 1))
|
|
||||||
pair = Fcons (o, pair);
|
|
||||||
|
|
||||||
/* Plant the mark. The garbage collector will eventually
|
|
||||||
reclaim any just-allocated incompressible pairs. */
|
|
||||||
XSETCDR (pair, ltv_mark);
|
|
||||||
}
|
|
||||||
|
|
||||||
v = (emacs_value) ((intptr_t) XCONS (pair) + Lisp_Cons);
|
v = (emacs_value) ((intptr_t) XCONS (pair) + Lisp_Cons);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue