diff options
author | Nick Clifton <nickc@redhat.com> | 2000-09-03 17:35:07 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2000-09-03 17:35:07 +0000 |
commit | b18903cb91a18943fa8a8f75cdb2e5ee2a77936f (patch) | |
tree | 2c9419ed3783f6bdfc0f9f3874cb8e375d69f3fc /include/libiberty.h | |
parent | d155c6ea0bb38ee153221bd1decf2eefccdb7abb (diff) | |
download | binutils-gdb-b18903cb91a18943fa8a8f75cdb2e5ee2a77936f.tar.gz |
Add ARRAY_SIZE macro from egcs version
Diffstat (limited to 'include/libiberty.h')
-rw-r--r-- | include/libiberty.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libiberty.h b/include/libiberty.h index 476e0165b3e..e6eb34739ce 100644 --- a/include/libiberty.h +++ b/include/libiberty.h @@ -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 |