aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-02-06 20:50:06 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-02-08 12:34:13 +0900
commit899ea35035c5bfb78fcdbc9fbfaafba24aee49c1 (patch)
treeb573908f3ef532fe17ef57f69a69acc1788783d5 /configure.ac
parent1e711439762f47be1d1770b058a2f0246f64eab9 (diff)
downloadruby-899ea35035c5bfb78fcdbc9fbfaafba24aee49c1.tar.gz
Extract include/ruby/internal/attr/packed_struct.h
Split `PACKED_STRUCT` and `PACKED_STRUCT_UNALIGNED` macros into the macros bellow: * `RBIMPL_ATTR_PACKED_STRUCT_BEGIN` * `RBIMPL_ATTR_PACKED_STRUCT_END` * `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_BEGIN` * `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_END`
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 2 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 7db2ab5257..ff903a9260 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1484,10 +1484,9 @@ AC_CACHE_CHECK(packed struct attribute, rb_cv_packed_struct,
[rb_cv_packed_struct=$mac; break])
done])
AS_IF([test "$rb_cv_packed_struct" != no], [
- AC_DEFINE_UNQUOTED([PACKED_STRUCT(x)], [$rb_cv_packed_struct])
+ AC_DEFINE_UNQUOTED([RBIMPL_ATTR_PACKED_STRUCT_BEGIN()], [`echo " $rb_cv_packed_struct " | sed 's/ x .*//;s/^ *//'`])
+ AC_DEFINE_UNQUOTED([RBIMPL_ATTR_PACKED_STRUCT_END()], [`echo " $rb_cv_packed_struct " | sed 's/.* x //;s/ *$//'`])
RUBY_TRY_CFLAGS(-Wno-address-of-packed-member, [AC_DEFINE(USE_UNALIGNED_MEMBER_ACCESS)])
-], [
- AC_DEFINE_UNQUOTED([PACKED_STRUCT(x)], x)
])
AS_IF([test "x$ac_cv_type_long_long" = xyes], [