summaryrefslogtreecommitdiff
path: root/win32
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 /win32
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 'win32')
-rw-r--r--win32/Makefile.sub10
1 files changed, 2 insertions, 8 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 23662346f9..903a338942 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -734,14 +734,8 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
#define FUNC_FASTCALL(x) __fastcall x
!if $(MSC_VER) >= 1500
#define RUBY_FUNCTION_NAME_STRING __FUNCTION__
-#define PACKED_STRUCT(x) __pragma(pack(push, 1)) x __pragma(pack(pop))
-!else
-#define PACKED_STRUCT(x) x
-!endif
-!if "$(MACHINE)" == "x86" || "$(ARCH)" == "x64"
-#define PACKED_STRUCT_UNALIGNED(x) PACKED_STRUCT(x)
-!else
-#define PACKED_STRUCT_UNALIGNED(x) x
+#define RBIMPL_ATTR_PACKED_STRUCT_BEGIN() __pragma(pack(push, 1))
+#define RBIMPL_ATTR_PACKED_STRUCT_END() __pragma(pack(pop))
!endif
#define RUBY_EXTERN extern __declspec(dllimport)
#define RUBY_ALIGNAS(n) __declspec(align(n))