aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/include/irrpack.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/irrlicht-1.8/include/irrpack.h')
-rw-r--r--libraries/irrlicht-1.8/include/irrpack.h78
1 files changed, 39 insertions, 39 deletions
diff --git a/libraries/irrlicht-1.8/include/irrpack.h b/libraries/irrlicht-1.8/include/irrpack.h
index 3cf643f..29a16fe 100644
--- a/libraries/irrlicht-1.8/include/irrpack.h
+++ b/libraries/irrlicht-1.8/include/irrpack.h
@@ -1,39 +1,39 @@
1// Copyright (C) 2007-2012 Nikolaus Gebhardt 1// Copyright (C) 2007-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5// include this file right before the data structures to be 1-aligned 5// include this file right before the data structures to be 1-aligned
6// and add to each structure the PACK_STRUCT define just like this: 6// and add to each structure the PACK_STRUCT define just like this:
7// struct mystruct 7// struct mystruct
8// { 8// {
9// ... 9// ...
10// } PACK_STRUCT; 10// } PACK_STRUCT;
11// Always include the irrunpack.h file right after the last type declared 11// Always include the irrunpack.h file right after the last type declared
12// like this, and do not put any other types with different alignment 12// like this, and do not put any other types with different alignment
13// in between! 13// in between!
14 14
15// byte-align structures 15// byte-align structures
16#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) 16#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
17# pragma warning(disable: 4103) 17# pragma warning(disable: 4103)
18# pragma pack( push, packing ) 18# pragma pack( push, packing )
19# pragma pack( 1 ) 19# pragma pack( 1 )
20# define PACK_STRUCT 20# define PACK_STRUCT
21#elif defined( __DMC__ ) 21#elif defined( __DMC__ )
22# pragma pack( push, 1 ) 22# pragma pack( push, 1 )
23# define PACK_STRUCT 23# define PACK_STRUCT
24#elif defined( __GNUC__ ) 24#elif defined( __GNUC__ )
25 // Using pragma pack might work with earlier gcc versions already, but 25 // Using pragma pack might work with earlier gcc versions already, but
26 // it started to be necessary with gcc 4.7 on mingw unless compiled with -mno-ms-bitfields. 26 // it started to be necessary with gcc 4.7 on mingw unless compiled with -mno-ms-bitfields.
27 // And I found some hints on the web that older gcc versions on the other hand had sometimes 27 // And I found some hints on the web that older gcc versions on the other hand had sometimes
28 // trouble with pragma pack while they worked with __attribute__((packed)). 28 // trouble with pragma pack while they worked with __attribute__((packed)).
29# if (__GNUC__ >= 4 ) && (__GNUC_MINOR__ >= 7) 29# if (__GNUC__ >= 4 ) && (__GNUC_MINOR__ >= 7)
30# pragma pack( push, packing ) 30# pragma pack( push, packing )
31# pragma pack( 1 ) 31# pragma pack( 1 )
32# define PACK_STRUCT 32# define PACK_STRUCT
33# else 33# else
34# define PACK_STRUCT __attribute__((packed)) 34# define PACK_STRUCT __attribute__((packed))
35 #endif 35 #endif
36#else 36#else
37# error compiler not supported 37# error compiler not supported
38#endif 38#endif
39 39