• Paul Eggert's avatar
    Fix struct thread alignment on FreeBSD x86 · d2a07b9a
    Paul Eggert authored
    Problem reported by Joseph Mingrone in:
    https://lists.gnu.org/r/emacs-devel/2018-10/msg00238.html
    While we’re at it, apply a similar fix to struct Lisp_Subr; this
    removes the need for GCALIGNED_STRUCT_MEMBER and thus can shrink
    struct Lisp_Subr a bit.
    * configure.ac (HAVE_STRUCT_ATTRIBUTE_ALIGNED): Bring back this macro.
    Although used only for performance (not to actually align
    structures), we might as well take advantage of it.
    * src/lisp.h (GCALIGNED_STRUCT_MEMBER): Remove; all uses removed.
    (union Aligned_Lisp_Subr): New type, like struct Lisp_Subr but aligned.
    * src/lisp.h (XSUBR, DEFUN):
    * src/lread.c (defsubr): Use it.  All callers changed.
    * src/thread.c (union aligned_thread_state): New type.
    (main_thread): Now of this type, so it’s aligned.
    All uses changed.
    * src/xmenu.c (syms_of_xmenu) [USE_GTK || USE_X_TOOLKIT]:
    Adjust to union Aligned_Lisp_Subr change.
    d2a07b9a
configure.ac 189 KB