Skip to content

Commit 696888d

Browse files
hsbtshyouhei
andauthored
Backport commit from ruby core (#131)
ruby/ruby@12ec1fb Co-authored-by: 卜部昌平 <shyouhei@ruby-lang.org>
1 parent c313a74 commit 696888d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ext/fiddle/fiddle.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,10 @@
199199
/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023
200200
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
201201
clang versions < 8.0.0 have the same bug. */
202-
#if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112 \
202+
#if defined(HAVE__ALIGNOF)
203+
# /* Autoconf detected availability of a sane `_Alignof()`. */
204+
# define ALIGN_OF(type) RB_GNUC_EXTENSION(_Alignof(type))
205+
#elif (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112 \
203206
|| (defined(__GNUC__) && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
204207
&& !defined(__clang__)) \
205208
|| (defined(__clang__) && __clang_major__ < 8))

0 commit comments

Comments
 (0)