Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/assimp/Compiler/pushpack1.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 
0002 
0003 // ===============================================================================
0004 // May be included multiple times - sets structure packing to 1
0005 // for all supported compilers. #include <poppack1.h> reverts the changes.
0006 //
0007 // Currently this works on the following compilers:
0008 // MSVC 7,8,9
0009 // GCC
0010 // BORLAND (complains about 'pack state changed but not reverted', but works)
0011 // Clang
0012 //
0013 //
0014 // USAGE:
0015 //
0016 // struct StructToBePacked {
0017 // } PACK_STRUCT;
0018 //
0019 // ===============================================================================
0020 
0021 #ifdef AI_PUSHPACK_IS_DEFINED
0022 #   error poppack1.h must be included after pushpack1.h
0023 #endif
0024 
0025 #if (defined(_MSC_VER) && !defined(__clang__)) ||  defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
0026 #   pragma pack(push,1)
0027 #   define PACK_STRUCT
0028 #elif defined( __GNUC__ ) || defined(__clang__)
0029 #   if !defined(HOST_MINGW)
0030 #       define PACK_STRUCT  __attribute__((__packed__))
0031 #   else
0032 #       define PACK_STRUCT  __attribute__((gcc_struct, __packed__))
0033 #   endif
0034 #else
0035 #   error Compiler not supported
0036 #endif
0037 
0038 #if defined(_MSC_VER)
0039 // C4103: Packing was changed after the inclusion of the header, probably missing #pragma pop
0040 #   pragma warning (disable : 4103)
0041 #endif
0042 
0043 #define AI_PUSHPACK_IS_DEFINED