1 /* Public domain */ 2 3 #ifndef _LINUXKPI_LINUX_STDDEF_H_ 4 #define _LINUXKPI_LINUX_STDDEF_H_ 5 6 #include <sys/stddef.h> 7 8 /* 9 * FreeBSD has multiple (vendor) drivers containing copies of this 10 * and including LinuxKPI headers. Put the #defines behind guards. 11 */ 12 13 #ifndef __struct_group 14 #define __struct_group(_tag, _name, _attrs, _members...) \ 15 union { \ 16 struct { _members } _attrs; \ 17 struct _tag { _members } _attrs _name; \ 18 } _attrs 19 #endif 20 21 #ifndef struct_group 22 #define struct_group(_name, _members...) \ 23 __struct_group(/* no tag */, _name, /* no attrs */, _members) 24 #endif 25 26 #ifndef struct_group_tagged 27 #define struct_group_tagged(_tag, _name, _members...) \ 28 __struct_group(_tag, _name, /* no attrs */, _members) 29 #endif 30 31 #endif /* _LINUXKPI_LINUX_STDDEF_H_ */ 32