author | rocky <rocky@gnu.org> | 2012年09月26日 12:13:35 -0400 |
---|---|---|
committer | rocky <rocky@gnu.org> | 2012年09月26日 12:13:35 -0400 |
commit | 4c5369b7c407666f15beef4b6cacba8d8dfdf397 (patch) | |
tree | a30e817a7f4c93de600eeaddddca89524e3a28de | |
parent | 560f593195315468a99c8071a318b57b30218e88 (diff) | |
download | libcdio-4c5369b7c407666f15beef4b6cacba8d8dfdf397.tar.gz |
-rw-r--r-- | include/cdio/types.h | 24 |
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 /* |