Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-09-03 21:35:07 +0400
committerNick Clifton <nickc@redhat.com>2000-09-03 21:35:07 +0400
commit9c136d7ea6c180419f55b166c9acfed2ac6e2221 (patch)
tree0a19f85e63bdf0e2c353011fd33b7a81ceb6c07b /include
parent260c1f9039a40dc445eac6e8970b566bd6d1cc00 (diff)
Add ARRAY_SIZE macro from egcs version
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog4
-rw-r--r--include/libiberty.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 6f570ac95..c49acf04d 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-08-08 Jason Eckhardt <jle@cygnus.com>
* opcode/i860.h: Small formatting adjustments.
diff --git a/include/libiberty.h b/include/libiberty.h
index 476e0165b..e6eb34739 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