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. 5 * 6 * Declaring packed structures is compiler specific. In order to handle all 7 * cases, packed structures should be delared as: 8 * 9 * #include <packed_section_start.h> 10 * 11 * typedef BWL_PRE_PACKED_STRUCT struct foobar_t { 12 * some_struct_members; 13 * } BWL_POST_PACKED_STRUCT foobar_t; 14 * 15 * #include <packed_section_end.h> 16 * 17 * 18 * Copyright (C) 1999-2011, Broadcom Corporation 19 * 20 * Permission to use, copy, modify, and/or distribute this software for any 21 * purpose with or without fee is hereby granted, provided that the above 22 * copyright notice and this permission notice appear in all copies. 23 * 24 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 25 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 26 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 27 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 28 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 29 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 30 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 31 * 32 * $Id: packed_section_end.h,v 1.4 2008-12-09 23:43:22 Exp $ 33 */ 34 35 36 37 38 #ifdef BWL_PACKED_SECTION 39 #undef BWL_PACKED_SECTION 40 #else 41 #error "BWL_PACKED_SECTION is NOT defined!" 42 #endif 43 44 45 46 47 48 #undef BWL_PRE_PACKED_STRUCT 49 #undef BWL_POST_PACKED_STRUCT 50