From ee034bd811b542551fbf840c1a500f91d16bad08 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sun, 1 Jan 2017 12:31:02 +0100 Subject: [PATCH] Document PACK_STRUCT_USE_INCLUDES #define --- src/include/lwip/arch.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/include/lwip/arch.h b/src/include/lwip/arch.h index 2289c782..d8b13a57 100644 --- a/src/include/lwip/arch.h +++ b/src/include/lwip/arch.h @@ -266,6 +266,17 @@ extern "C" { #define PACK_STRUCT_FLD_S(x) PACK_STRUCT_FIELD(x) #endif /* PACK_STRUCT_FLD_S */ +/** Packed structs support using \#include files before and after struct to be packed.\n + * The file included BEFORE the struct is "arch/bpstruct.h".\n + * The file included AFTER the struct is "arch/epstruct.h".\n + * This can be used to implement struct packing on MS Visual C compilers, see + * the Win32 port in the lwIP contrib repository for reference. + * For examples of packed struct declarations, see include/lwip/prot/ subfolder.\n + * A port to GCC/clang is included in lwIP, if you use these compilers there is nothing to do here. + */ +#ifdef __DOXYGEN__ +#define PACK_STRUCT_USE_INCLUDES +#endif /** Eliminates compiler warning about unused arguments (GCC -Wextra -Wunused). */ #ifndef LWIP_UNUSED_ARG