Get rid of various old compiler and platform checks

This commit is contained in:
sfan5
2022-02-26 11:38:43 +01:00
parent 01586f584a
commit df908ef4ea
20 changed files with 34 additions and 214 deletions

View File

@ -13,26 +13,13 @@
// in between!
// byte-align structures
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
#if defined(_MSC_VER)
# pragma warning(disable: 4103)
# pragma pack( push, packing )
# pragma pack( 1 )
# define PACK_STRUCT
#elif defined( __DMC__ )
# pragma pack( push, 1 )
# define PACK_STRUCT
#elif defined( __GNUC__ )
// Using pragma pack might work with earlier gcc versions already, but
// it started to be necessary with gcc 4.7 on mingw unless compiled with -mno-ms-bitfields.
// And I found some hints on the web that older gcc versions on the other hand had sometimes
// trouble with pragma pack while they worked with __attribute__((packed)).
# if (__GNUC__ > 4 ) || ((__GNUC__ == 4 ) && (__GNUC_MINOR__ >= 7))
# pragma pack( push, packing )
# pragma pack( 1 )
# define PACK_STRUCT
# else
# define PACK_STRUCT __attribute__((packed))
#endif
# define PACK_STRUCT __attribute__((packed))
#else
# error compiler not supported
#endif