pshpack4.h 1.1 KB

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