| 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: pshpack1.h |
| 9 | // |
| 10 | // =========================================================================== |
| 11 | |
| 12 | /*++ |
| 13 | |
| 14 | Abstract: |
| 15 | |
| 16 | This file turns 1 byte packing of structures on. (That is, it disables |
| 17 | automatic alignment of structure fields.) An include file is needed |
| 18 | because various compilers do this in different ways. For Microsoft |
| 19 | compatible compilers, this files uses the push option to the pack pragma |
| 20 | so that the poppack.h include file can restore the previous packing |
| 21 | reliably. |
| 22 | |
| 23 | The file poppack.h is the complement to this file. |
| 24 | |
| 25 | --*/ |
| 26 | |
| 27 | #if ! (defined(lint) || defined(RC_INVOKED)) |
| 28 | #if ( _MSC_VER >= 800 && !defined(_M_I86)) || defined(_PUSHPOP_SUPPORTED) |
| 29 | #pragma warning(disable:4103) |
| 30 | #if !(defined( MIDL_PASS )) || defined( __midl ) |
| 31 | #pragma pack(push,1) |
| 32 | #else |
| 33 | #pragma pack(1) |
| 34 | #endif |
| 35 | #else |
| 36 | #pragma pack(1) |
| 37 | #endif |
| 38 | #endif // ! (defined(lint) || defined(RC_INVOKED)) |
| 39 | |