diff options
| author | Paul Eggert | 2017-11-02 13:06:38 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-11-02 13:21:33 -0700 |
| commit | 6b08ad5263bc063c79666ffe2bd5ed9ab77a00a0 (patch) | |
| tree | c31fb8bdc9d639cc96982aa4718d74f4cc0e0397 /src/thread.c | |
| parent | a9f8706fa8fba5289e910fd55841b0952410d558 (diff) | |
| download | emacs-6b08ad5263bc063c79666ffe2bd5ed9ab77a00a0.tar.gz emacs-6b08ad5263bc063c79666ffe2bd5ed9ab77a00a0.zip | |
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.
Diffstat (limited to 'src/thread.c')
| -rw-r--r-- | src/thread.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/thread.c b/src/thread.c index 7a670ba410b..03f5b31855e 100644 --- a/src/thread.c +++ b/src/thread.c | |||
| @@ -26,9 +26,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 26 | #include "coding.h" | 26 | #include "coding.h" |
| 27 | #include "syssignal.h" | 27 | #include "syssignal.h" |
| 28 | 28 | ||
| 29 | #define THREAD_ALIGNMENT COMMON_MULTIPLE (alignof (max_align_t), GCALIGNMENT) | 29 | static struct thread_state GCALIGNED main_thread; |
| 30 | |||
| 31 | static struct thread_state alignas (THREAD_ALIGNMENT) main_thread; | ||
| 32 | 30 | ||
| 33 | struct thread_state *current_thread = &main_thread; | 31 | struct thread_state *current_thread = &main_thread; |
| 34 | 32 | ||