mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
lib/zt_common.h: add macro for determining field size
The macro `sizeof_field` is used in the next patch. Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
2734724432
commit
d712806b39
@@ -32,6 +32,10 @@
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#ifndef sizeof_field
|
||||
#define sizeof_field(type, field) (sizeof((type *)0)->field)
|
||||
#endif
|
||||
|
||||
#ifdef UNUSED
|
||||
#elif defined(__GNUC__)
|
||||
# define UNUSED(x) UNUSED_ ## x __attribute__((unused))
|
||||
|
||||
Reference in New Issue
Block a user