X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=compiler%2Fcompiler.h;h=91a988369eccff1576ac60ef5c65c8cb52fb8310;hp=20df21d050c3ba7941e705bf51140430dd7b237a;hb=c26438ad4a14ece7784c6952694d8984ce32bc1c;hpb=db37d89074ed204c9c2bd010e72f63dcf4725715;ds=sidebyside diff --git a/compiler/compiler.h b/compiler/compiler.h index 20df21d0..91a98836 100644 --- a/compiler/compiler.h +++ b/compiler/compiler.h @@ -69,4 +69,9 @@ #endif +#ifdef FIO_INTERNAL +#define ARRAY_SIZE(x) (sizeof((x)) / (sizeof((x)[0]))) +#define FIELD_SIZE(s, f) (sizeof(((typeof(s))0)->f)) +#endif + #endif