summaryrefslogtreecommitdiffhomepage
path: root/compat/macros.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'compat/macros.hpp')
-rw-r--r--compat/macros.hpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/compat/macros.hpp b/compat/macros.hpp
index 8f807bf0..ed0bd8da 100644
--- a/compat/macros.hpp
+++ b/compat/macros.hpp
@@ -45,18 +45,24 @@
#ifdef Q_CREATOR_RUN
# define warn_result_unused
-#elif defined(_MSC_VER)
+#elif defined _MSC_VER
# define warn_result_unused _Check_return_
#else
# define warn_result_unused __attribute__((warn_unused_result))
#endif
-#if defined(__GNUG__)
+#if defined __GNUG__
# define unused(t, i) t __attribute__((unused)) i
#else
# define unused(t, i) t
#endif
+#if defined _MSC_VER
+# define aligned_struct(x) struct __declspec(align(x))
+#else
+# define aligned_struct(x) struct __attribute__((__aligned__(x)))
+#endif
+
#if defined __GNUC__
# define likely(x) __builtin_expect(!!(x),1)
# define unlikely(x) __builtin_expect(!!(x),0)