]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: define ARRAY_CARDINALITY in system.h
authorJim Meyering <meyering@redhat.com>
Sun, 17 May 2009 11:01:37 +0000 (13:01 +0200)
committerJim Meyering <meyering@redhat.com>
Sun, 17 May 2009 11:59:12 +0000 (13:59 +0200)
* src/system.h (ARRAY_CARDINALITY): Define if not already defined.

src/system.h

index 5bc23b32fb48bae802977e065a9145c0d8cfe3ea..74d86bbeeb488de0183417705d0b5ee7944d9a7d 100644 (file)
@@ -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