Add ARRAY_SIZE macro from egcs version

This commit is contained in:
Nick Clifton
2000-09-03 17:35:07 +00:00
parent 260c1f9039
commit 9c136d7ea6
2 changed files with 6 additions and 0 deletions

View File

@ -200,6 +200,8 @@ extern int asprintf PARAMS ((char **, const char *, ...)) ATTRIBUTE_PRINTF_2;
extern int vasprintf PARAMS ((char **, const char *, va_list))
ATTRIBUTE_PRINTF(2,0);
#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
#ifdef __cplusplus
}
#endif