summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-05-17 13:01:37 +0200
committerJim Meyering <meyering@redhat.com>2009-05-17 13:59:12 +0200
commit9b54961b13af78c4805076c6b6739cc282b53c5e (patch)
tree3200f1876e8907c56c49314e73f2c25caea4b095 /src
parent50ca12c28d2f0b3df73a026a1fecea294c4cb42c (diff)
downloadcoreutils-9b54961b13af78c4805076c6b6739cc282b53c5e.tar.xz
maint: define ARRAY_CARDINALITY in system.h
* src/system.h (ARRAY_CARDINALITY): Define if not already defined.
Diffstat (limited to 'src')
-rw-r--r--src/system.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/system.h b/src/system.h
index 5bc23b32f..74d86bbee 100644
--- a/src/system.h
+++ b/src/system.h
@@ -702,3 +702,7 @@ io_blksize (struct stat sb)
}
void usage (int status) ATTRIBUTE_NORETURN;
+
+#ifndef ARRAY_CARDINALITY
+# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
+#endif