summaryrefslogtreecommitdiff
path: root/win32/Makefile.sub
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-25 07:00:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-25 07:00:10 +0000
commitdf9199d468ffd0b0dfc669dbbb8923301a4b1d07 (patch)
tree7e3714b240777b2637cdfecadc8741daa09e87d9 /win32/Makefile.sub
parent7af1261dc8478fde09aa7ed0c9052c03917f2c18 (diff)
configure.in, win32/Makefile.sub: PACKED_STRUCT with VC
* configure.in (PACKED_STRUCT): check VC pragma too, and make function-style macro. * win32/Makefile.sub (PACKED_STRUCT): enable with VC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/Makefile.sub')
-rw-r--r--win32/Makefile.sub8
1 files changed, 6 insertions, 2 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 03cf781..dd3514b 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -570,8 +570,12 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
!if $(MSC_VER) >= 1500
#define RUBY_FUNCTION_NAME_STRING __FUNCTION__
!endif
-#define PACKED_STRUCT
-#define PACKED_STRUCT_UNALIGNED
+#define PACKED_STRUCT(x) __pragma(pack(push, 1)) x __pragma(pack(pop))
+!if "$(ARCH)" == "x86" || "$(ARCH)" == "x64" || "$(ARCH)" == "ia64"
+#define PACKED_STRUCT_UNALIGNED(x) PACKED_STRUCT(x)
+!else
+#define PACKED_STRUCT_UNALIGNED(x) x
+!endif
#define RUBY_EXTERN extern __declspec(dllimport)
#define HAVE_DECL_SYS_NERR 1
#define HAVE_LIMITS_H 1