[build] Provide common ARRAY_SIZE() definition

Several files define the ARRAY_SIZE() macro as used in Linux.  Provide
a common definition for this in include/compiler.h.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2017-03-10 15:44:11 +00:00
parent 4524cc11bf
commit afdebdc163
9 changed files with 9 additions and 19 deletions
-2
View File
@@ -23,8 +23,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
#ifndef _PCNET32_H_
#define _PCNET32_H_
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
/*
* Set the number of Tx and Rx buffers, using Log_2(# buffers).
* Set default values to 16 Tx buffers and 32 Rx buffers.