vrshoot

view libs/assimp/assimp/Compiler/pushpack1.h @ 0:b2f14e535253

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 01 Feb 2014 19:58:19 +0200
parents
children
line source
3 // ===============================================================================
4 // May be included multiple times - sets structure packing to 1
5 // for all supported compilers. #include <poppack1.h> reverts the changes.
6 //
7 // Currently this works on the following compilers:
8 // MSVC 7,8,9
9 // GCC
10 // BORLAND (complains about 'pack state changed but not reverted', but works)
11 //
12 //
13 // USAGE:
14 //
15 // struct StructToBePacked {
16 // } PACK_STRUCT;
17 //
18 // ===============================================================================
20 #ifdef AI_PUSHPACK_IS_DEFINED
21 # error poppack1.h must be included after pushpack1.h
22 #endif
24 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
25 # pragma pack(push,1)
26 # define PACK_STRUCT
27 #elif defined( __GNUC__ )
28 # define PACK_STRUCT __attribute__((packed))
29 #else
30 # error Compiler not supported
31 #endif
33 #if defined(_MSC_VER)
35 // C4103: Packing was changed after the inclusion of the header, propably missing #pragma pop
36 # pragma warning (disable : 4103)
37 #endif
39 #define AI_PUSHPACK_IS_DEFINED