From 4e6879f50eedabc0a46ed95e2cec71fe8ae1f7cb Mon Sep 17 00:00:00 2001
From: gkm <gkm@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu, 24 Aug 2000 20:28:15 +0000
Subject: [PATCH] 	* libiberty.h (ARRAY_SIZE): New macro.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35947 138bc75d-0d04-0410-961f-82ee72b054a4
---
 include/ChangeLog   | 4 ++++
 include/libiberty.h | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/include/ChangeLog b/include/ChangeLog
index 2a07ee04d824..b31a6550393b 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2000-08-24  Greg McGary  <greg@mcgary.org>
+
+	* libiberty.h (ARRAY_SIZE): New macro.
+
 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
 
 	* dyn-string.h (dyn_string_init, dyn_string_new,
diff --git a/include/libiberty.h b/include/libiberty.h
index 476e0165b3ee..e6eb34739ce9 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
-- 
GitLab