1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

Fix alignment portability problems

Do not assume that the natural alignment of Lisp objects is a
multiple of GCALIGNMENT.  This improves on the portability of the
recent fix for Bug#29040.
* lib-src/make-docfile.c (close_emacs_globals):
* src/buffer.c (buffer_defaults, buffer_local_symbols):
* src/lisp.h (DEFUN):
* src/thread.c (main_thread):
Use GCALIGNED, not alignas (GCALIGNMENT).
* src/alloc.c (COMMON_MULTIPLE):
Move back here from lisp.h, since it is no longer used elsewhere.
* src/lisp.h (GCALIGNMENT): No longer a macro, since we need not
worry about MSVC.  Omit no-longer-needed consistency check.
* src/thread.c (THREAD_ALIGNMENT): Remove.
This commit is contained in:
Paul Eggert 2017-11-02 13:06:38 -07:00
parent a9f8706fa8
commit 6b08ad5263
5 changed files with 18 additions and 23 deletions

View file

@ -668,7 +668,7 @@ close_emacs_globals (ptrdiff_t num_symbols)
"extern\n"
"#endif\n"
"struct {\n"
" struct Lisp_Symbol alignas (GCALIGNMENT) s;\n"
" struct Lisp_Symbol GCALIGNED s;\n"
"} lispsym[%td];\n"),
num_symbols);
}