mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Correctly detect whether strict alignment is needed on OpenBSD
From Stefan Sperling <stsp@apache.org>
This commit is contained in:
parent
768bd6e533
commit
00dc8c0246
1 changed files with 10 additions and 0 deletions
10
compile.c
10
compile.c
|
@ -841,6 +841,16 @@ rb_iseq_original_iseq(const rb_iseq_t *iseq) /* cold path */
|
||||||
#define STRICT_ALIGNMENT
|
#define STRICT_ALIGNMENT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Some OpenBSD platforms (including sparc64) require strict alignment.
|
||||||
|
*/
|
||||||
|
#if defined(__OpenBSD__)
|
||||||
|
#include <sys/endian.h>
|
||||||
|
#ifdef __STRICT_ALIGNMENT
|
||||||
|
#define STRICT_ALIGNMENT
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef STRICT_ALIGNMENT
|
#ifdef STRICT_ALIGNMENT
|
||||||
#if defined(HAVE_TRUE_LONG_LONG) && SIZEOF_LONG_LONG > SIZEOF_VALUE
|
#if defined(HAVE_TRUE_LONG_LONG) && SIZEOF_LONG_LONG > SIZEOF_VALUE
|
||||||
#define ALIGNMENT_SIZE SIZEOF_LONG_LONG
|
#define ALIGNMENT_SIZE SIZEOF_LONG_LONG
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue