1 | // Licensed to the .NET Foundation under one or more agreements. |
2 | // The .NET Foundation licenses this file to you under the MIT license. |
3 | // See the LICENSE file in the project root for more information. |
4 | // |
5 | |
6 | // |
7 | // =========================================================================== |
8 | // File: pshpack2.h |
9 | // |
10 | // =========================================================================== |
11 | /*++ |
12 | |
13 | Abstract: |
14 | |
15 | This file turns 2 byte packing of structures on. (That is, it disables |
16 | automatic alignment of structure fields.) An include file is needed |
17 | because various compilers do this in different ways. For Microsoft |
18 | compatible compilers, this files uses the push option to the pack pragma |
19 | so that the poppack.h include file can restore the previous packing |
20 | reliably. |
21 | |
22 | The file poppack.h is the complement to this file. |
23 | |
24 | --*/ |
25 | |
26 | #if ! (defined(lint) || defined(RC_INVOKED)) |
27 | #if ( _MSC_VER >= 800 && !defined(_M_I86)) || defined(_PUSHPOP_SUPPORTED) |
28 | #pragma warning(disable:4103) |
29 | #if !(defined( MIDL_PASS )) || defined( __midl ) |
30 | #pragma pack(push,2) |
31 | #else |
32 | #pragma pack(2) |
33 | #endif |
34 | #else |
35 | #pragma pack(2) |
36 | #endif |
37 | #endif // ! (defined(lint) || defined(RC_INVOKED)) |
38 | |