Some places have opencoded the ARRAY_SIZE macro, so move it to a global
internal location so other places can leverage it.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
#endif /* __ASSEMBLER__ */
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+
/* Some people like to build up uClibc with *-elf toolchains, so
* a little grease here until we drop '#ifdef __linux__' checks
* from our source code.
#define DPRINTF(X,args...)
#endif
-#undef ARRAY_SIZE
-#define ARRAY_SIZE(v) (sizeof(v) / sizeof((v)[0]))
-
/* Make sure the incoming char * buffer is aligned enough to handle our random
* structures. This define is the same as we use for malloc alignment (which
* has same requirements). The offset is the number of bytes we need to adjust