"Always" means "even on compilers that don't define __GNUC__". If we
don't want
#if X
{nothing}
#else
#undef UNALIGNED
#define UNALIGNED __attribute__((packed))
#endif
because it's backwards, just do
#if !(X)
#undef UNALIGNED
#define UNALIGNED __attribute__((packed))
#endif
* Note: this also requires that padding be put into the structure,
* at least for compilers where it's implemented as __attribute__((packed)).
*/
-#if defined(__GNUC__)
+#if !(defined(_MSC_VER) && defined(UNALIGNED))
+/* MSVC may have its own macro defined with the same name and purpose. */
#undef UNALIGNED
#define UNALIGNED __attribute__((packed))
-#else
- /* MSVC may have its own macro defined with the same name and purpose. */
#endif
#if defined(WIN32) || defined(MSDOS)