summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrocky <rocky@gnu.org>2012-09-26 12:13:35 -0400
committerrocky <rocky@gnu.org>2012-09-26 12:13:35 -0400
commit4c5369b7c407666f15beef4b6cacba8d8dfdf397 (patch)
treea30e817a7f4c93de600eeaddddca89524e3a28de
parent560f593195315468a99c8071a318b57b30218e88 (diff)
Work on packed definition for MinGW
-rw-r--r--include/cdio/types.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/cdio/types.h b/include/cdio/types.h
index 7f83a301..d00c3590 100644
--- a/include/cdio/types.h
+++ b/include/cdio/types.h
@@ -151,21 +151,21 @@ typedef uint8_t ubyte;
#define GNUC_PACKED
#endif /* !__GNUC__ */
-#if defined(__GNUC__)
- /* for GCC we try to use GNUC_PACKED */
-# define PRAGMA_BEGIN_PACKED
-# define PRAGMA_END_PACKED
+#if defined(__MINGW32__)
+# define PRAGMA_BEGIN_PACKED _Pragma("pack(push)") \
+ _Pragma("pack(1)")
+# define PRAGMA_END_PACKED _Pragma("pack(pop)")
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
- /* should work with most EDG-frontend based compilers */
-# define PRAGMA_BEGIN_PACKED _Pragma("pack(1)")
-# define PRAGMA_END_PACKED _Pragma("pack()")
+ /* should work with most EDG-frontend based compilers */
+# define PRAGMA_BEGIN_PACKED _Pragma("pack(1)")
+# define PRAGMA_END_PACKED _Pragma("pack()")
#elif defined(_MSC_VER)
-# define PRAGMA_BEGIN_PACKED __pragma(pack(push, 1))
-# define PRAGMA_END_PACKED __pragma(pack(pop))
+# define PRAGMA_BEGIN_PACKED __pragma(pack(push, 1))
+# define PRAGMA_END_PACKED __pragma(pack(pop))
#else /* neither gcc nor _Pragma() available... */
- /* ...so let's be naive and hope the regression testsuite is run... */
-# define PRAGMA_BEGIN_PACKED
-# define PRAGMA_END_PACKED
+ /* ...so let's be naive and hope the regression testsuite is run... */
+# define PRAGMA_BEGIN_PACKED
+# define PRAGMA_END_PACKED
#endif
/*