Move ARRAY_SIZE() out of gpioinfo.c and place it in tools-common.h.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
#include <getopt.h>
#include <errno.h>
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
-
struct flag {
const char *name;
bool (*is_set)(struct gpiod_line *);
#define UNUSED __attribute__((unused))
#define PRINTF(fmt, arg) __attribute__((format(printf, fmt, arg)))
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
void set_progname(char *name);
const char * get_progname(void);