mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-04 11:00:45 -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:
parent
a9f8706fa8
commit
6b08ad5263
5 changed files with 18 additions and 23 deletions
|
|
@ -621,6 +621,12 @@ buffer_memory_full (ptrdiff_t nbytes)
|
|||
#endif
|
||||
}
|
||||
|
||||
/* A common multiple of the positive integers A and B. Ideally this
|
||||
would be the least common multiple, but there's no way to do that
|
||||
as a constant expression in C, so do the best that we can easily do. */
|
||||
#define COMMON_MULTIPLE(a, b) \
|
||||
((a) % (b) == 0 ? (a) : (b) % (a) == 0 ? (b) : (a) * (b))
|
||||
|
||||
#ifndef XMALLOC_OVERRUN_CHECK
|
||||
#define XMALLOC_OVERRUN_CHECK_OVERHEAD 0
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue