Broadcom SDK and wireless driver: another attempt to update to ver. 5.10.147.0
[tomato.git] / release / src-rt / include / packed_section_end.h
blob785e63b2c9f81784d18d156ba5bca187db665570
1 /*
2 * Declare directives for structure packing. No padding will be provided
3 * between the members of packed structures, and therefore, there is no
4 * guarantee that structure members will be aligned.
6 * Declaring packed structures is compiler specific. In order to handle all
7 * cases, packed structures should be delared as:
9 * #include <packed_section_start.h>
11 * typedef BWL_PRE_PACKED_STRUCT struct foobar_t {
12 * some_struct_members;
13 * } BWL_POST_PACKED_STRUCT foobar_t;
15 * #include <packed_section_end.h>
18 * Copyright (C) 2009, Broadcom Corporation
19 * All Rights Reserved.
21 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
22 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
23 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
24 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
25 * $Id: packed_section_end.h,v 1.4.16.1 2009/03/11 18:03:06 Exp $
29 /* Error check - BWL_PACKED_SECTION is defined in packed_section_start.h
30 * and undefined in packed_section_end.h. If it is NOT defined at this
31 * point, then there is a missing include of packed_section_start.h.
33 #ifdef BWL_PACKED_SECTION
34 #undef BWL_PACKED_SECTION
35 #else
36 #error "BWL_PACKED_SECTION is NOT defined!"
37 #endif
40 #if defined(_MSC_VER)
41 /* Disable compiler warning about pragma pack changing alignment. */
42 #pragma warning(disable:4103)
44 /* The Microsoft compiler uses pragmas for structure packing. Other
45 * compilers use structure attribute modifiers. Refer to
46 * BWL_PRE_PACKED_STRUCT and BWL_POST_PACKED_STRUCT defined in
47 * typedefs.h
49 #if defined(BWL_DEFAULT_PACKING)
50 /* require default structure packing */
51 #pragma pack(pop)
52 #undef BWL_DEFAULT_PACKING
53 #else /* BWL_PACKED_SECTION */
54 #pragma pack()
55 #endif /* BWL_PACKED_SECTION */
56 #endif /* _MSC_VER */
59 /* Compiler-specific directives for structure packing are declared in
60 * packed_section_start.h. This marks the end of the structure packing section,
61 * so, undef them here.
63 #undef BWL_PRE_PACKED_STRUCT
64 #undef BWL_POST_PACKED_STRUCT