Created
July 13, 2018 08:40
-
-
Save OlivierLDff/51983c134487a36169dbd58bc3a49290 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef __GNUC__ | |
/*code for GNU C compiler */ | |
#define PRE_PACKED_ENUM_DEF | |
#define POST_PACKED_ENUM_DEF __attribute__((packed)); | |
#elif _MSC_VER | |
/*code specific to MSVC compiler*/ | |
#define PRE_PACKED_ENUM_DEF __pragma(pack(push, 1)) | |
#define POST_PACKED_ENUM_DEF __pragma(pack(pop)); | |
#elif __MINGW32__ | |
/*code specific to mingw compilers*/ | |
#define PRE_PACKED_ENUM_DEF | |
#define POST_PACKED_ENUM_DEF __attribute__((packed)); | |
#else | |
#error "compiler not supported : see OsDef.hpp to fix" | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment