Home | History | Annotate | Download | only in include
      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-2013, 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 241182 2011-02-17 21:50:03Z $
     33  */
     34 
     35 
     36 /* Error check - BWL_PACKED_SECTION is defined in packed_section_start.h
     37  * and undefined in packed_section_end.h. If it is NOT defined at this
     38  * point, then there is a missing include of packed_section_start.h.
     39  */
     40 #ifdef BWL_PACKED_SECTION
     41 	#undef BWL_PACKED_SECTION
     42 #else
     43 	#error "BWL_PACKED_SECTION is NOT defined!"
     44 #endif
     45 
     46 
     47 
     48 
     49 /* Compiler-specific directives for structure packing are declared in
     50  * packed_section_start.h. This marks the end of the structure packing section,
     51  * so, undef them here.
     52  */
     53 #undef	BWL_PRE_PACKED_STRUCT
     54 #undef	BWL_POST_PACKED_STRUCT
     55